Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By natttan on
How to theme (or do anything else with) some filed of particular node? What tpl.php file to create in order to override that field, and only that field, and only in that node? For example body field just for node/5.
And just one similar question. What tpl.php file to create in order to override particular field, in particular page?
Thanks in advance!
Comments
Take a look at this page for
Take a look at this page for theming suggestions. You can easily override node pages for content types or specific NID by adhering to certain tpl naming conventions. The aforementioned page lists all the possibilities.
You can for example make a tpl with the name node--5.tpl.php to theme a node page with nid 5.
Thanks.
Thanks.