logo       

Re: Grouping nodes under a single date header: msg#00054

php.drupal.support

Subject: Re: Grouping nodes under a single date header

Ha! I'm so slowly learning:
<?php
global $current_date;
if ($date != $current_date) {
print " <div class=\"date\">". $date ."</div>\n";
$current_date = $date;
}
?>

This solved the first problem. Now I need to format and filter the date...
If I'll be able to finish all that I'll write a tutorial for super dummies
to move from MT to Drupal.

Abalieno


> I worked a bit on it following the example and I added this to
node.tpl.php
> using phptemplate as the theme
>
> <div class="date">
> <?php
> global $current_date;
> if ($date != $current_date) {
> print $date;
> $current_date = $date;
> }
> ?>
> </div>
>
> Now I obviously have two problems. The first is that the div class needs
to
> be *inside* the if block, just before the print command. How could I do
> this? I just don't know the correct syntax.
>
> The second problem is that this system uses the complete $date, so it
check
> hours too...
>
> Abalieno

--
[ Drupal support list | http://list.drupal.org/ ]



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise