简体   繁体   中英

Drupal 7 - Add a wrapper around related nodes on Taxonomy term page

On a taxonomy term page, the taxonomy term info is shown first, followed by related nodes. I want to add a wrapper div around the related nodes (ex. class="related-nodes").

taxonomy-terms.tpl.php controls the display of the taxonomy term's fields, but I'm not sure how the nodes show up. I was thinking about making a node template for the taxonomy and doing something like render($content['nodes']). However, I'm not sure what the $content key would be for the related nodes.

One approach is to enable the Taxonomy term view display (is disabled by default). In the view config, you can add classes by clicking in Settings of Format option.

Hope it helps.

Regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM