[pmwiki-users] One PageList using several fmt : possible ?

ABClf languefrancaise at gmail.com
Fri Dec 10 05:37:30 CST 2010


Very nice. Thank you Petko for the help !


2010/12/10 Petko Yotov <5ko at 5ko.fr>:
> On Friday 10 December 2010 03:53:54, ABClf wrote :
>> For a basic example, imagine I want for my page Category.Something
>> (and every page in group Category) to show this :
>> -if group the page listed belongs to is Info, then extract the
>> title_info ptv for linking
>> -if group the page listed belongs to is not Info, then use its name for
>> linking.
>>
>> Info
>> *my title
>> *my other title
>>
>> OtherGroup
>> *name
>
> Hello.
>
> In your template, [[{=$FullName}|+]], will show the page title when it exists,
> and the page name, when a title isn't defined.
>
> However, you want to read a custom PTV title, not the regular page title.
> Something like this could work:
>
> in Site.LocalTemplates
> [[#myfmt]]
> (:template first {=$Group}:)
>
> :[[{=$Group}/]] /:
> (:template each:)
> (:if equal "{=$Group}" "Info":)
> * [[{=$FullName}| {=$:title_info} ]]
> (:else:)
> * [[{=$Group}/{=$Name}]]
> (:ifend:)
> [[#myfmtend]]
>
> In Category.GroupFooter:
> (:pagelist link={*$FullName} fmt=#myfmt:)
>
> The conditional (:if group Info:) wouldn't work as the "group" conditional is
> related to the page being browsed, ie. Category.SomePage.
>
> Petko
>



-- 

---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------



More information about the pmwiki-users mailing list