Thursday 21 April 2005 1:19:45 am
Hi,
I added a empty datefield to the article class to allowed users to change the publication date. In article.tpl I wrote this :
{section show=$node.object.data_map.date_de_publication.content.is_empty|not()}
{$node.object.data_map.date_de_publication.data_int|datetime(custom,"%F %Y")}
{section-else}
{$node.object.published|datetime(custom,"%F %Y")}
{/section}
So if users leave it blank we use the publication's date. but this : {$node.object.published|datetime(custom,"%F %Y")}
nested in {section-else} print January 1970. When this part of the code is out of the section block I have the good date. Any hint ? Laurent
|