ThisSite
<< | Cookbook-V1 | >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
Goal
Provide the keyword "ThisSite:" to link to pages on current site outside the wiki.
Solution
Add the following lines to your local.php
$SiteUrl = 'http://'.$HTTP_SERVER_VARS['HTTP_HOST']; $LinkPatterns[400]["\\bThisSite:($UrlPathPattern)"] = $FmtUrlLink; $InterMapUrls['ThisSite'] = $SiteUrl."/wiki/";
It is also possible to change the script URL for links within wiki. This example shows the use on https servers:
$ScriptUrl = 'https://'.$HTTP_SERVER_VARS['HTTP_HOST'] . $HTTP_SERVER_VARS['SCRIPT_NAME'];
Discussion
Just use "ThisSite:/somepath/somepage.htm" to set local links on any wiki page.
Contributors
Mailinglist User pmwiki-2.4.2 -- Last modified by {{}}?