[pmwiki-users] Help using Custom markup plus ParseArgs

Pico pmwiki at ben-amotz.com
Thu Apr 6 06:03:16 CDT 2006


Octocias wrote:
> Hi. Thanks for the feedback.
>
> Are you referring to a combination of
>
> http://www.pmwiki.org/wiki/Cookbook/EditTemplates and  
> http://www.pmwiki.org/wiki/PmWiki/Directives#pagelist ?
>
> regards,
>
>
>
> On 06/04/06, *Dominique Faure* < dominique.faure at gmail.com 
> <mailto:dominique.faure at gmail.com>> wrote:
>
>     On 4/6/06, Octocias < octocias at googlemail.com
>     <mailto:octocias at googlemail.com>> wrote:
>     > Hi All,
>     >
>     > I've been looking at:
>     >
>     > http://www.pmwiki.org/wiki/Cookbook/ParseArgs   and
>     > http://pmwiki.org/wiki/PmWiki/CustomMarkup
>     >
>     >
>     > I'm having problems understanding  how to combine boths sets of
>     help to
>     > acheive what I want.
>     >
>     > I'd *like* to do this:
>     >
>     > In one WikiPage, I would have fragments of content representing
>     an entire
>     > "content set".. e.g. I plan to host a profile of all my friends
>     and family.
>     > A single person would have one WikiPage dedicated to them. That
>     WikiPage
>     > would contain (for example): "surname", "summary", "full profile",
>     > "ThumbnailOnly", "PersonalLink", etc.
>     >
>     > If I wanted to make a single page filled with thumbnails of
>     people I would
>     > like to do this:
>     > (:PersonData person="jason hattingh" content=ThumbnailOnly:)
>     > (:PersonData person="ayn rand" content=ThumbnailOnly:)
>     >
>     > ..etc..
>     >
>     > If I wanted to make a single page filled with ROWS dedicated to
>     summaries of
>     > people I would like to do this:
>     >
>     > (:PersonData person="JasonHattingh" content=summary:)
>     > (:PersonData person="AynRand" content=summary:)
>     >
>     > ..etc..
>     >
>     >
>     > The result is that the args are used to construct a link which
>     reads between
>     > "specified section start" and "specified section end"
>     > I have yet to learn to use PHP, but I imagine that I would
>     interpret the
>     > args in this (pseudo code) way:
>     >
>     >
>     > // construct part of the wiki link e.g. People.JasonHattingh
>     > $Pagename = "People." + $args['person']
>     >
>     > // construct the bookmark extraction specification:
>     > $Section = "#" + $args['section'] + "S" + "#" + $args['section']
>     + "E"
>     >
>     >
>     > // Piece it together:
>     >
>     > $FullLink = $PageName + $section
>     >
>     > some_incluce_command( $FullLink );
>     >
>     >
>     >
>     > Ok, that's it.. I hope it's clear enough.. Does this seem a good
>     way to do
>     > it? I am quite worried that I may be barking up an inefficient
>     tree.
>     >
>
>     Why don't you try with (:pagelist:) using a specific template?
>
Take a look at how Pm used pagelist on the Frequently Asked Questions 
(FAQ) page to grab Q & A from individual pages, using:

http://pmwiki.org/wiki/PmWiki/PageLists
http://pmwiki.org/wiki/Site/PageListTemplates

For more background, look at:

http://pmwiki.org/wiki/Cookbook/PagelistExplained
http://pmwiki.org/wiki/Cookbook/PagelistTemplateSamples
http://pmwiki.org/wiki/Cookbook/PageListWikiTrail


Pico




More information about the pmwiki-users mailing list