path to call CSS for new template file (sorry me again..)
public
group: Zen Task Force
Gerben - Tue, 2008-08-12 13:11
I created a new template file called "page-taxonomy-term.tpl.php", based on the node.tpl.php. The idea is to create a different look for taxonomy term pages. As it turns out the new template file is not associated with any CSS sheet. After looking in the forums I realised I need to call the CSS correctly. Normally this is done by inputting
<?php
print $styles;
?>This partly solves the look of the taxonomy term pages but not completely: header and sidebars and footer are gone and only the content of the age itself is displayed. I have been trying to insert various other peaces of code (like
<?php
print $header;
?>Does it have to do with the fact that Zen theme does not have a default style.css so I need to add something?
Many thanks,
Gerben


hm.... you mean you created
hm....
you mean you created a page-...php.tpl based on copying the code from node.php.tpl... and not copying the code from the the page.php.tpl inside the zen folder? that may be the source of your woes.
<h1>OMG THIS IS THE TAXONOMY TEMPLATE</h1>- outside of the<?php ...?>tagsdoes that help?
Thanks again for the
Thanks again for the reply!
You are right, the new template file should be based on the page.tpl.php and not the node.tpl.php. I played around with this for a while: one problem with manipulating the template file is that the
<?phpprint $content;
?>
However, this issue is related to my other question here http://groups.drupal.org/node/13891. It can be solved with the Views Module without a need to manipulate template files.
Sorry for asking all these questions in the last days. One of the confusing things about Drupal (for a beginner) is that there are sometimes different paths to desired Walhalla and it's all a bit confusing.. ur..
All best,
Gerben
Just wanted to add
Just wanted to add something, which since this is an older post you probably discovered: the
<?phpprint $content;
?>
By editing those files (copy/paste from the node.tpl.php file to start), you can fully control the output on a programmatic level. Obviously Views is a very powerful tool as well, and can do many of the things you want to do, but thought I'd mention the above to help you or anyone else out if they are struggling to edit that elusive
print $content;Hope that helps someone out!
-dellintosh