By cmckay on
Ok, so I ran into a theming hiccup that I can't figure out, maybe someone can help. I have a background that I would like to display for all node types. It involves a background image for the header which seamlessly integrates with the background for the node's content. When using a view that displays multiple nodes on one page, the theming is flawless. The problem however comes when viewing the node itself - the node title now becomes the page title. If I apply the background image, it will show on all page titles and thus breaks the overall theme of the site.
Is there any way of getting around this?
Comments
Some suggestions
Hard to picture exactly what you are doing, you may want to try making adjustments to the page.tpl.php or creating a custom node-YOURCONTENTTYPE.tpl.php.
Also, a module that has helped me out is:
http://drupal.org/project/taxonomy_theme
To make things clearer: From
To make things clearer:
From a fresh install of Drupal. If I create a story. The story will appear on the front page as teaser. If I click on the title of the node, it will take me to the actual node page.
Problem: If I want to apply a background image to a story's title, I can do this with node.tpl.php. This background image will appear on the front page, as it is actual showing nodes. However, this background will not appear when I click to go on the node itself because Drupal now sees it as an H1 page title. If I theme H1, all page titles have this background.
Question: How can I selectively theme all page titles for the story node type without affecting every page title?
Hope this makes it a bit clearer. Thanks for your feedback.
Sub class?
I haven't done much work with story, but I would imagine (seeing from how Drupal sets up other classes) that the H1 in story can be modified using a subclass, something like:
Does that help?
It works
Your guess was right - it works great! Thanks for your help :)