0

I would like to remove the title from rendering in the natural taxonomy page template so that I can add it in the teaser and reorder the fields. Currently, the title shows first, and then the other fields in the teaser display. When I view the "Manage Display" for the teaser view mode, the title field is "hidden" and if I show it, it ends up appearing twice. I would like to unhide it, define a specific class reorder the fields.

Can this be done without an added module? I have already played around with taxonomy view but am asking for an alternative that doesn't require using the taxonomy view, which I have disabled for the time being. E.g. If I need to edit the template, which template would it be and what specific way does it need to be edited to remove the title? My site is complex with a bootstrap theme and a sub-theme that I purchased as well as my custom modifications.

See screenshots below for a visual.

Teaser with title hidden Teaser with title hidden

Shows title at the top without defined class enter image description here

Teaser with title shown and class defined Teaser with title shown and class defined

Shows title twice Teaser shows title twice

I want to make the one at the top go away or show it where the other one is with the proper class.

Bonus: I really want to add author and date information like in the screenshot below to the taxonomy template, which I pulled from my taxonomy view version before I disabled it. enter image description here

0

1 Answer 1

0

Option one might be to change the template tpl for your taxonomy page. You can also create a new view for your page.

5
  • In what way should I change the template for taxonomy and where is it located? Do I create a sub-theme or edit the current one?
    – Christia
    Commented Jul 7, 2017 at 23:13
  • You edit the template if you have access to it. Did you check some of the links to edit/modify your templates... If you are using D7 check this threat: drupal.org/node/1024312. Another solution, simple but I don't recommend, is to add CSS to hide the title on the pages with taxonomy.
    – aspagarino
    Commented Jul 7, 2017 at 23:36
  • I understand and read that post but I'm asking how to edit it for my specific purpose and where it is if that is the best option and what the best practices is for editing it.
    – Christia
    Commented Jul 7, 2017 at 23:38
  • Check the tpl under /sites/all/ themes/your-template/tpl
    – aspagarino
    Commented Jul 7, 2017 at 23:40
  • For anyone else that is looking for this: I wanted to add to this answer. I found drupal.org/docs/7/theming/core-templates that describes that the template is located in core /modules/taxonomy/taxonomy-term.tpl.php. And api.drupal.org/api/drupal/… lists available variables. This video describes where to copy the template to in order to make your own changes and how to name the file: drupalize.me/videos/overview-templatephp?p=1160. Also: othermachines.com/blog/….
    – Christia
    Commented Jul 14, 2017 at 7:22

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