51 Posts
ilga
10 years ago
1
Topic
I want to show NEW status informer for a new content. For example if content published 17.02.2014, NEW informer status inside the content should be visible till 19.02.2014 Any idea?
Get a VIP membership
693 Posts
rpoy
10 years ago
0
Level 1
Hi proelgiz,

Yes you can do what you want using a custom template.

All you need to do is have an End date, and a Free text field.  Then in the template, compare the dates to control the Free Text Field.

$sEndDate = $cck->getValue('newenddate');
$sEndDate = strtotime($sEndDate);
$sNow = strtotime("now");

if ($sNow < $sEndDate){
echo $cck->renderField('new');
}











Hope that helps,

Randy
Get a Book for SEBLOD