[pmwiki-users] Variables in localmap.txt (Was: clean URLs for wikifarm in

Patrick R. Michaud pmichaud at pobox.com
Wed Mar 16 09:58:25 CST 2005


On Wed, Mar 16, 2005 at 11:04:06AM +0100, chr at home.se wrote:
> This reminded me... I think it'd be very useful if localmap.txt etc could
> contain variables. The reason is that I have quite a few lines in my
> localmap.txt, and when I wish to test it in another location, I have to
> change *all* the lines manually...

Is it sufficient if the variables are substituted at the time 
localmap.txt and other intermaps are loaded (as opposed to when 
the intermap links are actually generated)?  

> In the example above, we might imagine having this instead:
> 	Gallery		{$ThisSite}/uploads/Gallery/$1
> or
> 	Gallery		${ThisSite}/uploads/Gallery/$1
> depending on what syntax flavour you prefer...

The syntax would likely be:

    Gallery       $ThisSite/uploads/Gallery/$1

We also have the outstanding issue (from Neil Herber, I believe), of
wanting to be able to place things in the localmap.txt file that result
in substitutions but don't require the colon, so that certain barewords
always result in links.  For example, some sort of notation that would
allow

    Pm            http://www.pmichaud.com/

to always convert the bareword "Pm" into a link to http://www.pmichaud.com/
wherever it occurs.  In retrospect it would've been nice if localmap.txt
had required the colon in the entries, to distinguish between the
colon-required replacements and simple bareword substitutions, but it
didn't happen that way, and I think converting to that format might cause
a fair number of upgrade headaches... :-|

Pm



More information about the pmwiki-users mailing list