Page 1 of 1
Have upgraded - now News module not displaying date
Posted: Tue Jan 20, 2009 8:40 pm
by robinmarek
I'd imagine it's something very simple, but couldn't see a solution....
I've just upgraded a CMSMS site that was originally 1.4.1, now in 1.5.2
Everything seems to be working lovely (touch wood) but the dates have disappeared on the articles - any ideas?
Re: Have upgraded - now News module not displaying date
Posted: Tue Jan 20, 2009 9:02 pm
by Ziggywigged
Change all instances of
Code: Select all
{$entry->formatpostdate|cms_date_format}
to
Code: Select all
{$entry->postdate|cms_date_format}
in your news templates.
Re: Have upgraded - now News module not displaying date
Posted: Tue Jan 20, 2009 9:13 pm
by robinmarek
Hmmm, I just tried that but doesn't seem to do anything,
The Summary News template is this (albeit my stripped down version)
Code: Select all
<!-- Start News Display Template -->
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">
{if $entry->formatpostdate}
<div class="NewsSummaryPostdate">
{$entry->formatpostdate}
</div>
<br />
{/if}
<div class="NewsSummaryLink">
{$entry->titlelink}
</div>
{if $entry->summary}
<div class="NewsSummaryMorelink">
{$entry->morelink}
</div>
{else if $entry->content}
{/if}
{if isset($entry->extra)}
<div class="NewsSummaryExtra">
{eval var=$entry->extra}
{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div>
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsSummaryField">
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
</div>
{/foreach}
<!-- End News Display Template -->
Re: Have upgraded - now News module not displaying date
Posted: Tue Jan 20, 2009 9:26 pm
by Ziggywigged
Re: Have upgraded - now News module not displaying date
Posted: Fri Jan 23, 2009 10:16 am
by robinmarek
I tried that but it doesn't seem to have worked

Re: Have upgraded - now News module not displaying date
Posted: Tue Jan 27, 2009 11:39 am
by robinmarek
Anyone got a solution?
Re: Have upgraded - now News module not displaying date
Posted: Tue Jan 27, 2009 11:51 am
by Rolf
Hey Robinmarek,
Please mail use some more info...
How do call the news module in your template for instance?
{news..........}
The code Ziggywigged sent you is correct. This should be working.
You have to change this in your news templates.
See also the help function of the news module.
®olf

Re: Have upgraded - now News module not displaying date
Posted: Tue Jan 27, 2009 12:04 pm
by RonnyK
Robin,
in the summary-template you posted, is still the 'formatpostdate' available....
There should the "formatpostdate" be replaced with "postdate"....
Ronny