I have a content type with some custom text fields. when the node displays I'd like to show it like this:


  • field-1 (link)
  • field-2 (link)
  • field-3 (link)




this is for a new site, so I'd like to do that on Drupal 8 (with bootstrap theme).

1 Answer 1


For this requirement you should go for twig to your content type:


In hook_preprocess_HOOK render all the fields you would like to show in twig file.

For better understanding of twig file follow this.

  • thanks! but could you elaborate a little on how to do that? i'm new this kind of dynamic templates and specifically to twig templates
    – gusans
    Commented Dec 5, 2016 at 12:44
  • Copy node.html.twig as node--content-type.html.twig and print the elements as per your requirement.
    – Ajay Reddy
    Commented Dec 5, 2016 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.