"New!" Menu Item

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
CMSmonkey
Power Poster
Power Poster
Posts: 290
Joined: Thu Nov 27, 2008 4:58 pm

"New!" Menu Item

Post 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.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: "New!" Menu Item

Post by jmcgin51 »

do you want it to be "new" from the publication date, or "new" from when the user last visited?
CMSmonkey
Power Poster
Power Poster
Posts: 290
Joined: Thu Nov 27, 2008 4:58 pm

Re: "New!" Menu Item

Post by CMSmonkey »

It should start from the publication date (the date the page was created).
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: "New!" Menu Item

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
CMSmonkey
Power Poster
Power Poster
Posts: 290
Joined: Thu Nov 27, 2008 4:58 pm

Re: "New!" Menu Item

Post by CMSmonkey »

Thanks, tyman!  I will try to work with it in the meantime and see if I can come up with something too.
Post Reply

Return to “Layout and Design (CSS & HTML)”