logo       

Re: Two problems: msg#00051

php.drupal.support

Subject: Re: Two problems

On Thu, 8 Jul 2004 22:32:45 +0200, Abalieno <cesspit@xxxxxxxxxxx> wrote:

It is as Gordon described. In the .theme file for your theme, find the
_node function and, using a static variable, keep track of the date. If
the date changes, output the date.

Can you paste here that bit of code? I don't know PHP and I need to look at
an example to adapt it to my template.

This did the trick for me.

static $current_date;

if (format_date($node->created, 'custom', 'Ymd') != $current_date) {

$output .= " <h2>". format_date($node->created, 'custom', 'F j, Y') ."</h2>\n";
$current_date = format_date($node->created, 'custom', 'Ymd');
}

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



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

News | FAQ | advertise