[pmwiki-users] Link "last news" automatically

Francesco Sblendorio sblendorio at gmail.com
Thu May 13 18:45:13 CDT 2010

I solved this way:

I did a page called "News/Latest" so:

(:pagelist trail=News/News fmt=#redirect count=1 order=-ctime:)
(:if false:)
(:template first:)
(:redirect {=$FullName} quiet=1:)
(:template each:)

...then, the permalink now is "News/Latest", and it redirects the browser
automatically to the last news.

Thanks to you all, I learnt much things with this thread!

2010/5/13 Hans <design5 at softflow.co.uk>

> Thursday, May 13, 2010, 11:14:22 AM, Francesco Sblendorio wrote:
> > No, that way it'll be displayed the page "News.News", while I need
> > the first actual news, but with the possibility to have a permanent
> > link that displays the latest news
> if you want a static link in the sidebar, not dynamic links generated
> by pagelist, you could
> 1) either insert the static link markup directly into sideBar,
> 2) or insert it via  a page text variable:
> Add to news.News a PTV like
> (:topnews: News.CicapLombardiaSuArteTV :)
> fixing the page name for the top news article as a PTV.
> Then add to SideBar:
> %sidehead% [[{News.News$:topnews}| News]]
> followed by the usual pagelist for the trail.
>  ~Hans

Francesco Sblendorio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100514/d5d02b28/attachment.html>

More information about the pmwiki-users mailing list