[pmwiki-users] Fwd: pagelist of referenced items
Randy Brown
alongkiss at aprivatespot.com
Thu Aug 12 11:04:20 CDT 2010
Try this (untested):
(:comment --- a question's page name is the text used for the anchor, while it's title is what appears in the listing ---:)
(:comment --- e.g. a question name might be "answerQuestion125", while its title might be "Aren't pagelists powerful?" ---:)
(:comment --- process all questions in title order ---:)
(:pagelist group=Question order=title fmt=#processquestion:)
(:if1 false:)
[[#processquestion]]
(:comment --- for the current question, list all pages outside the Question group that contain an answer
(:pagelist group=-Question "[[#{=$Name}]]" questionfullname={=$FullName} order=title fmt=#listanswerstoquestion:)
[[#processquestionend]]
[[#listanswerstoquestion]]
(:comment --- if more than one page answers the question, each will be separated by a comma ---:)
(:template first:)
- {{$$questionfullname}$Title}:
(:template !last:)
(:if !equal "{>$FullName}" "":)
,
(:template each:)
[[{=$FullName}#{{$$questionfullname}$Name}|+]]
(:template last:)
\\
(:ifend:)
[[#listanswerstoquestionend]]
(:if1end:)
Randy
On Aug 12, 2010, at 2:58 AM, Markus Heinzer wrote:
> Randy, I think this will do the job exactly!
> I put such anchors on the content pages and the pagelist lists these anchors. I tried to follow your suggestion with the two pagelists but I have to admit that this exceeds my capabilities. I don't understand how this is constructed. Can you give me one more hint how to code this pagelist that shows all anchors beginning with [[#answer ?
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list