logo       

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

php.drupal.support

Subject: Re: Grouping nodes under a single date header

Now it works as intended, I messed even on phptemplate.theme before finding
the solution. And it was so easy:

<?php
global $current_date;
if (format_date($node->created, 'custom', 'Ymd') != $current_date) {
print " <div class=\"date\">". format_date($node->created, 'custom', 'F j,
Y') ."</div>\n";
$current_date = format_date($node->created, 'custom', 'Ymd');
}
?>

I just added this on node.tpl.php and it works perfectly like MovableType
now.
Current progress is here: http://www.cesspit.net/drupal/

Abalieno


> 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

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



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

News | FAQ | advertise