By Eluzion on
Would anyone happen to know which php tag I would use in Contemplate to print the date of a node and the taxonomy terms it's using?
For time, I see this:
print $node->changed
That just simply prints out a long list of numbers.
For the taxonomy term, I see this:
<?php print $node->taxonomy[1]->name ?
But that only prints one specific term and not the one that current node is using.
Comments
For the date
The long list of numbers sounds like a timestamp.
You need to format this using the PHP Date function: http://uk.php.net/date or you could try using
format_date($node->created).If you look in node.tpl.php and the other *.tpl.php files you'll get an idea of the other variables involved. I believe you can use
$termsfor the taxonomy terms.Hope this helps.
Regards,
Sverre :-)
--
Sverre Sverresonn
Group Scout Leader
21st Medway Scouts, Kent, UK
http://www.21stmedway.org.uk/
Thanks for the reply. Using
Thanks for the reply. Using format_date($node->created) I get the following:
Thu, 01/03/2008 - 23:01
I looked through that link you provided but I can't seem to figure out how to use the PHP Date function. I'd like to format the date so it's simply 03 January 2007, or something along those lines. I'm sure it's simple but my knowledge of PHP is next to none. =(
As for the taxonomy terms, that didn't seem to work. Basically I'm trying to have the taxonomy terms related to a specific blog entry be displayed.