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.
"New!" Menu Item
Re: "New!" Menu Item
do you want it to be "new" from the publication date, or "new" from when the user last visited?
Re: "New!" Menu Item
It should start from the publication date (the date the page was created).
Re: "New!" Menu Item
I think it should be possible. It would be along these lines but you will need to find and play with the exact syntax
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.
Code: Select all
{$node->menuText} {if $todaydate <= ($node->postDate)+30}<img src="new.jpg" alt="NEW!" />{/if}
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.
Re: "New!" Menu Item
Thanks, tyman! I will try to work with it in the meantime and see if I can come up with something too.

