Skip to main content
Tweeted twitter.com/StackDrupal/status/736871155840233472
removed tags from title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

8 - How do I theme a link with twig for a specific content type?

I'm trying to create a custom file-link.html.twigfile-link.html.twig for a particular content type. I've looked at https://www.drupal.org/node/2354645 which doesn't link plugin theme twigs like file-link but tried file-link--<CONTENTYPE>.html.twig anyway. It doesn't work.

None of the variables passed include the node or content type. Any ideas on how to proceed?

8 - How do I theme a link with twig for a specific content type?

I'm trying to create a custom file-link.html.twig for a particular content type. I've looked at https://www.drupal.org/node/2354645 which doesn't link plugin theme twigs like file-link but tried file-link--<CONTENTYPE>.html.twig anyway. It doesn't work.

None of the variables passed include the node or content type. Any ideas on how to proceed?

How do I theme a link with twig for a specific content type?

I'm trying to create a custom file-link.html.twig for a particular content type. I've looked at https://www.drupal.org/node/2354645 which doesn't link plugin theme twigs like file-link but tried file-link--<CONTENTYPE>.html.twig anyway. It doesn't work.

None of the variables passed include the node or content type. Any ideas on how to proceed?

Source Link
Nic
  • 1.2k
  • 2
  • 17
  • 28

8 - How do I theme a link with twig for a specific content type?

I'm trying to create a custom file-link.html.twig for a particular content type. I've looked at https://www.drupal.org/node/2354645 which doesn't link plugin theme twigs like file-link but tried file-link--<CONTENTYPE>.html.twig anyway. It doesn't work.

None of the variables passed include the node or content type. Any ideas on how to proceed?