[pmwiki-users] silly question about (:if match :)
Wouter Groeneveld
jefklak at gmail.com
Mon Oct 16 13:42:19 CDT 2006
Suppose I have the following pages
Cat/SomePage
Cat/SomePage_detail1
Cat/SomePage_detail2
AnotherCat/Page
AnotherCat/Page_detail
I'd like to create a pagelist directive wich sorts them this way:
Cat/
SomePage
detail1
detail2
AnoterhCat/
Page
detail
I'm stuck Modifying the #default template:
[[#notDefault]]
(:if ! equal {=$Group} {<$Group}:)
:[[{=$Group}/]] /:
(:if:)
: :[[{=$Group}/{=$Name}]] - {=$Title}
(:pagelist group={=$Group} list=normal fmt=#detail:)
(:if:)
[[#notDefault]]
[[#detail]]
(:if match /_/i {=$Name} :)
--> [[{=$Group}/{=$Name}]] - {=$Title}
(:pagelist list=normal fmt=#detail:)
(:if:)
[[#detail]]
I don't really know what I'm doing, but the #detail should find the
{=$Name}_* pages and print them, but the match expression does not seem to
work, I don't have any clue how it does work and can't find examples. Even
if it does, I'd get doubles in my list. Is there any easy way to create a
pagelist with those 'sub categories' if you create a Group/Page_SubPage with
'_' or whatever?
Thanks!
-- Wouter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20061016/9301b26d/attachment.html
More information about the pmwiki-users
mailing list