1

I have been trying to theme my taxonomy page output following this tutorial

http://mustardseedmedia.com/podcast/episode31

The tutorial suggest using taxonomy_term_page.tpl.php to override the default output and embed a view.

Unfortunately I have not been successful. It seems that taxonomy_term_page.tpl.php is totally ignored.

I thought I had a solution when I started using page-taxonomy-term.tpl.php instead, this seems to get picked up however $tid is not passed to this template so I am unable to pull the taxonomy items.

I am using drupal 6.26.

EDIT

According to the video tutorial

Step 1) Create a blank file named taxonomy_term_page.tpl.php within theme folder

Step 2) Navigate to a taxonomy page. This should produce a page (with headers and footers) but no actual content, since taxonomy_term_page.tpl.php overrides the taxonomy output and this file is currently empty.

It is at Step 2 that I am stuck. The taxonomy pages return a page filled with taxonomy nodes, it seems that taxonomy_term_page.tpl.php is being ignored. I have flushed all caches and I cannot seem to figure out what is outputting the current content.

SOLUTION (a bad one)

Since I have spent so much time on this I decided to scrap the idea of using taxonomy_term_page.tpl.php because in my setup it simply wasn't overriding the taxonomy pages.

Instead I am using page-taxonomy-term.tpl.php which does override the taxonomy pages in my setup. However the downside to this is that this template does not have $tids available to use as required by the tutorial. So to get this I have used the following code in page-taxonomy-term.tpl.php

$splode=explode("/",$_GET['q']);
$tids[]=$splode[2];

It essentially takes the query string in the url which looks like taxonomy/term/10. Then explodes the string by slashes and uses the last portion for it's tid.

It's nasty, disgusting, but I'm in a rush. If anyone has a better solution, I'd love to know.

  • 1
    Welcome to Drupal Answers :) Rather than expecting people to view an entire video to understand your question, it will help you get a better/quicker answer if you actually summarise the steps you've taken in the question body itself. – Clive Oct 29 '13 at 16:49
  • Hi Clive, sorry about that. Added some extra detail, hopefully that will help. – Lucas Scholten Oct 29 '13 at 17:07
  • groups.drupal.org/node/43398 you check out the comments in this link. "taxonomy_term (default)" view enabled was preventing the taxonomy_term_page.tpl.php from being processed. Once we disabled the taxonomy_term view the override page used in the Mustardseed demo began working and all was well. – Mohammed Shameem Oct 29 '13 at 17:52
  • @MohammedShameem thanks, however I had already tried that. This view is already disabled in my setup, so something else is causing the problem. Is there a way I can see what is generating the current page? – Lucas Scholten Oct 30 '13 at 9:08
  • You can install the devel module and there is a devel theme module which tells you which all theme files are being used. – Mohammed Shameem Oct 30 '13 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.