[pmwiki-users] Link "last news" automatically

Hans design5 at softflow.co.uk
Sun May 9 12:06:12 CDT 2010

Sunday, May 9, 2010, 4:28:23 PM, Francesco Sblendorio wrote:

> Well, look at the "News" section: it's a wikitrail.
> I'd want to access to the first news (in this example "Il CICAP
> Lombardia su Arte Tv") just by clicking on "News" (currently "News"
> links to the wikitrail page that collects links).

> Is there a simple way to get that?

perhaps not simple, but this should work:

In Site.SideBar instead of

%sidehead% [[News/News|News]]
%sidehead% (:pagelist trail=News/News fmt=#titlespaced count=5 order=-ctime:)

try this:

%sidehead% (:pagelist trail=News/News fmt=#newshead count=1 order=-ctime:)
%sidehead% (:pagelist trail=News/News fmt=#titlespaced count=5 order=-ctime:)
(:if false:)
* [[{=$FullName}|News]]

The first pagelist outputs only one item (count=1), in fact the first
of the pagelist you get from the second page list.
The ouput is formatted with the custom format 'newshead',
which gives a link as a list item, with label 'News'.


More information about the pmwiki-users mailing list