Sorry, probably obvious but can't think of the answer.
I want to make a html link in a menu system always go to latest document in a folder for a news section. I'm using Ditto for news section but have a stand alone menu system.
I'm using Evolution 1.0.6 on PHP 5
Thanks, David
-
☆ A M B ☆
- 24,524 Posts
Use any kind of list snippet, set to order by create_date, and showing 1 result. Depending on where you want it in the menu, you'll need to have its output be the same structure as your regular menu items, and use the CSS to make sure it's a seamless fit.
Thanks - brain got stuck there - a Ditto call with "&summarize=`1` and a minimal template should do it.
-
☆ A M B ☆
- 24,524 Posts
You can get really creative with Wayfinder templates, specifically the outerTpl that generates the outer ul tags. If your outerTpl only has the starting ul tag and the wf.wrapper placeholder, your custom insertion can use the same rowTpl as your Wayfinder menu does, as well as supply the outer closing ul tag, thus seamlessly embedding your link into the whole Wayfinder menu.
<li [+wf.classes+]> ... </li></ul>