[pmwiki-devel] page text variables across groups with Attach:

John Rankin john.rankin at affinity.co.nz
Thu Dec 16 17:22:27 CST 2010


On 16/12/10 11:12 PM, Peter Bowers wrote:
> On Wed, Dec 15, 2010 at 11:45 PM, John Rankin
> <john.rankin at affinity.co.nz>  wrote:
>> I don't see an easy way to tell pmwiki to retrieve the "graphic" PTV as
>> Attach:GroupA/an-image.png instead of just Attach:an-image.png, if that's
>> what the author entered -- I can't rely on people remembering to insert a
>> groupname when they set up a (:graphic: Attach:an-image.png :) PTV.
> This moves out of the "easy" category because there may be a lot of
> little conditions to check, but it looks like to me your custom markup
> is going to have to do variable substitution[1] for {$:graphic}, parse
> it, and add in the group name...  Of course if someone does put in the
> "Group./" prefix then you'll have to identify that and deal with it --
> probably other edge conditions as well...
Yes, such as (:graphics: http://....jpg :) -- it doesn't *have* to use 
Attach:-ed images.
> Either that or else move away from per-group uploads and just keep
> them in one central directory...
Or:

- treat graphic as a special case and instead of generating pagevar 
markup for pmwiki to parse, retrieve the pagevar value (if it exists), 
parse it and modify it along the lines you suggest, then let pmwiki 
parse the modified markup -- messy, but possible

- treat this as an edge case and don't try to deal with it at all -- if 
it occurs in practice, go back to the page defining the metadata to add 
a group prefix manually

Thanks

JR

-- 
John Rankin




More information about the pmwiki-devel mailing list