I'm also using the Event module, but I'm not sure the php code to use to get the "Medium date format" date to appear. Right now I'm using the code:
<?php print $node->start_format ?>
This returns a short formatted date (mm/dd/yyyy - 0:00pm)
The medium formatted date would be (Day mm/dd/yyyy - 0:00pm)
This really has to do with what contemplate themes. Contemplate is theming the the $content of the node.tpl.php file. So, what is being done in contemplate isn't the same as theming the node.tpl.php file but the ability to theme a subset of that.
When you go into contemplate the field to the right of the area your contemplate changes go into has the variables you can use. These are variables for the node object while what's in the node.tpl.php file are specific variables for phptemplate. They are different.
In contemplate try using '$node->path' to get the path to the node. If that doesn't work it means you don't have custom paths kicking. In that case try 'node/$node->nid' and that will make a path to the url. Does that make sense? These are relative paths.
Matt Farina
Geeks and God Co-Host
www.mattfarina.com
the way drupal is showing your date and time is setup in the /admin/settings section. If you want to use something different from the setup way check out the format_date function.
In this example I would try something like:
<?php
print format_date($node->created, 'medium');
?>If you are pulling the sate from a different variable replace $node->created with that. Be sure the date format is a unix timestamp. Make sense?
Matt Farina
Geeks and God Co-Host
www.mattfarina.com
Also, one other thing in addition to what MF says here....
Normally the contemplate calls don't include the initial slash (/). So, if you printed the node path, you have to include the / before the print command, otherwise the path won't be correct (it will be relative to whatever page you're currently on).
To check to see if this is your issue, just view the target link of your resulting styled node...that will tell you if you need that slash or not (If you're using the node path stuff from the sidebar of contemplate, you will...it took me a while to figure that out too)
-Rob Feature
Geeks and God Co-Host
www.bobchristenson.com
First off let me say "thank you, thank you" for your coverage of Drupal. It was very timely and necessary in my case.
I'm using Drupal 5.1, CCK & Contemplate. I find it to be a powerful combination. I've created a content type, and styled the body (full-view) of the node, but I am having problems with the teaser. Mainly, I can't create a title that links to the body (full-view) of the node. I'm using this code in contemplate:
<?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>Unfortunately,
$node_url?doesn't return any values. So it links to nowhere. It's weird because I copied that line directly out of the node.tpl.php file. And that same line from the node.tpl.php returns the value "/node/some node #" What's the deal?Thanks for any help you or your listeners could offer.
Phil