Page 1 of 1

"New!" Menu Item

Posted: Tue Oct 20, 2009 2:48 am
by CMSmonkey
Hi Everyone,
I have a site that has a bunch of lectures and articles.  On the lecture home page as well as the article home page, I have a dynamic list of the lectures/articles by using the following smarty code:

{menu start_level="2" show_all="1"}

Is there a way that when I post a new lecture or article that a "New!" image jpg would display at the end of the name?  Has anyone scripted something like this? I suppose I would need to add an expiration for it (say a month from when the page was first created)....

Any help is appreciated.

Thanks.

Re: "New!" Menu Item

Posted: Tue Oct 20, 2009 1:33 pm
by jmcgin51
do you want it to be "new" from the publication date, or "new" from when the user last visited?

Re: "New!" Menu Item

Posted: Tue Oct 20, 2009 4:06 pm
by CMSmonkey
It should start from the publication date (the date the page was created).

Re: "New!" Menu Item

Posted: Tue Oct 20, 2009 9:09 pm
by tyman00
I think it should be possible. It would be along these lines but you will need to find and play with the exact syntax

Code: Select all

{$node->menuText} {if $todaydate <= ($node->postDate)+30}<img src="new.jpg" alt="NEW!" />{/if}
It's crude and not even accurate... but hopefully it will inspire you. If I have a few spare moments I will try to research it better and provide more accurate code.

Re: "New!" Menu Item

Posted: Sat Oct 24, 2009 6:10 pm
by CMSmonkey
Thanks, tyman!  I will try to work with it in the meantime and see if I can come up with something too.