[Pmwiki-users] InterMap definitions

Patrick R. Michaud pmichaud at sci.tamucc.edu
Sun Feb 16 17:58:20 CST 2003


On Sun, 16 Feb 2003, Dawn Green wrote:

> Patrick wrote on this:
> 
> > I'm thinking about adding three InterMap definitions to PmWiki and would
> > like feedback (along the lines of "great idea", "good idea", "bad idea", 
> > "really bad idea", or "what are you talking about?").
> 
> So..."what are you talking about"?  I know what the InterMap is but I'm not
> sure how this applies.  Please bear with this novice who is learning this
> system verrry slowly!

Lots of times we'd like to be able to have a page refer to itself in
its URI-sense instead of its WikiWord sense.  I.e., I can refer to a page
as Main.HomePage or I can use http://my.server.com/pmwiki.php/Main/HomePage.
The first is more convenient for links between wiki pages, but the second
is easier for specifying operations such as edit, diff, attr, etc.:
    http://my.server.com/pmwiki.php/Main/HomePage?action=edit
    http://my.server.com/pmwiki.php/Main/HomePage?action=attr
    http://my.server.com/pmwiki.php/Main/HomePage?action=diff

But putting the full URI can be a bit cumbersome--lots of times we'd
like to have a shortcut of some sort to refer to the "current page's URI".
(You can refer to the current page's WikiWord name by using [[$Title]].)  
So, rather than create a new syntax, I can just overload the InterMap
syntax so that "ThisPage:" is an InterMap link to the URI of the current
page.  Thus, the above URIs become
    ThisPage:?action=edit
    ThisPage:?action=attr
    ThisPage:?action=diff

Furthore, these have the advantage of working even if they're included from
another page, e.g. in a GroupHeader.  The other InterMap links would be
ThisGroup and ThisWiki, as shortcuts to the current group URI and the wiki
URI.  

Does that help?

Pm





More information about the pmwiki-users mailing list