Hey,
I'm really starting to love the possibilities content template has opened up for me, but in the midst of playing around with the output of the teaser and body content, I notice I can't seem to access the title at all or control the output in any capacity. Is there any way to update the $title output through contemplate? That would save me alot of trouble trying to configure automatic node titles because it's having a problem getting the current taxonomy term.
Any help would be appreciated.
Thanks!
Comments
Comment #1
jrglasgow commentedThe title is set before contemplate gets invoked. You can over write the title by invoking the drupal_set_title() function.
Does this answer your question?
Comment #2
rc2020 commentedYeah it does, thanks.
I also wrote a node-type.tpl.php file, which sets the $title in addition to content templates, so I can use both interchangably, but its kind of an ugly fix...
Comment #3
philbar commentedI would also like this functionality.
I'm trying to append an icon to the title of specific content types. It would be awesome if I could do it with Contemplate rather than having to dig into the theme code.
Marking as a "feature request" and activating.
Comment #4
jrglasgow commentedit is easy enough to do with contemplate currently, just use the drupal_set_title() function mentioned in #1
Comment #5
philbar commentedI'm a novice when it comes to drupal code. Can you show me an example of how to use drupal_set_title() function?
I would like to take the title, and wrap it in a link.
So the title changes from
NODE_TITLEto<a href="URL">NODE_TITLE</a>.Thanks in advance.
Comment #6
jrglasgow commentedsomething like this
Comment #7
iantresman commentedI guess that if you wanted to change the position of a node's title, you could use CSS and set display:none, and then output it wherever you wanted with $node->title.