"New" Next to A New Listing

3 posts by 3 authors in: Forums > CMS Builder
Last Post: September 16, 2010   (RSS)

In the reality manage product we use to love when you added a new property and then once the property was pushed live it would display "NEW" in red for like 5 days. Does the new CMS application have that ability?



Thanks.



RIT
Jason Glass

Re: [rentittoday] "New" Next to A New Listing

By Jason - September 16, 2010

Hi,

Yes, you can do this when you're outputting your records. You can use code like this:

<?php $curDate = strtotime(date("Y-m-d"));
$pastDate = date("Y-m-d",strtotime("-5 days",$curDate));
?>
<?php foreach($articleRecords as $record): ?>
<?php if($record['createdDate']>=$pastDate):?>
<span style="color:red;">NEW!</span>
<?php endif ?>


CMS Builder doesn't support a way to display this inside the backend.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/