[pmwiki-users] is there a {$ServerUrl} page variable????

Patrick R. Michaud pmichaud at pobox.com
Fri Jan 19 10:22:07 CST 2007


On Fri, Jan 19, 2007 at 11:09:10AM -0500, Neil Herber (nospam) wrote:
> I am in the midst of trying to seamlessly migrate a bunch of wikis from
> one server to another. I have set up the new server to listen on port 81
> instead of 80 (the default).
> 
> So the URLs for the new server look like this:
> 
> > http://neil.eton.ca:81/wiki/index.php/Main/HomePage
> 
> I need to be able to specify the server URL for the SideBar links where 
> I currently have things like:
> 
> > * [[http://neil.eton.ca/commoninfo/webmastermail.shtml | Contact Form]]
> 
> which break because it is missing the port number. (It actually goes to 
> the old server.)
> 
> How do I do something like this:
> 
> > * [[{$ServerUrl}commoninfo/webmastermail.shtml | Contact Form]]

How about an InterMap shortcut instead?

    ServerUrl:   http://neil.eton.ca:81/

Then you can have:

    * [[ServerUrl:commoninfo/webmastermail.shtml | Contact Form]]

and when you need to change the port, simply change the InterMap
entry.

Or, if you know that the "commoninfo/webmastermail.shtml" is
always going to be on the same server as the wiki, you can use
the existing "Path:" InterMap shortcut:

    * [[Path:/commoninfo/webmastermail.shtml | Contact Form]]

Here, the string "Path:/" always means "the root directory of
the current server" (in fact, the above link will be relative, as in
<a href='/commoninfo/webmastermail.shtml'>...</a> ).

Pm





More information about the pmwiki-users mailing list