Have upgraded - now News module not displaying date

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Have upgraded - now News module not displaying date

Post 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?
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

Re: Have upgraded - now News module not displaying date

Post 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.
Take a penny, leave a penny.
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Re: Have upgraded - now News module not displaying date

Post 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 -->
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

Re: Have upgraded - now News module not displaying date

Post by Ziggywigged »

Change this

Code: Select all

{$entry->formatpostdate}
to

Code: Select all

{$entry->postdate}
Take a penny, leave a penny.
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Re: Have upgraded - now News module not displaying date

Post by robinmarek »

I tried that but it doesn't seem to have worked  :-\
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Re: Have upgraded - now News module not displaying date

Post by robinmarek »

Anyone got a solution?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Have upgraded - now News module not displaying date

Post 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  :D
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Have upgraded - now News module not displaying date

Post by RonnyK »

Robin,

in the summary-template you posted, is still the 'formatpostdate' available....

There should the "formatpostdate" be replaced with "postdate"....

Ronny
Post Reply

Return to “CMSMS Core”