[pmwiki-users] Displaying page URL

Bernard Bel bernarbel at gmail.com
Tue Jan 5 10:05:57 CST 2010

It works!

See test site: http://crdo.fr/pmwiki/HomePage

I constructed a page variable named $Urlbase and put it into the skin
template in replacement of other page variables that I estimated less
interesting. Below is the code that I put into config.php:

$pagename = ResolvePageName($pagename);
$group = PageVar($pagename, '$Group');
$name = PageVar($pagename, '$Name');
if($group != 'Main')
	$FmtPV['$UrlBase'] = '"http://crdo.fr/pmwiki/".$group."/".$name';
	$FmtPV['$UrlBase'] = '"http://crdo.fr/pmwiki/".$name';

Bernard Bel

>I guess you have to read http://www.pmwiki.org/wiki/PmWiki/PageVariables
>Page title is {$Title} ; page url is {$PageUrl} ; and so on.
>Use your GroupHeader to show what you need on every group's page.
>For example, in GroupHeader (or in another dedicaded page included in
>GroupHeader), try :
>{$PageUrl}, page consultée le {(ftime %F {$Today})}.
>2010/1/4 Bernard Bel <bernarbel at gmail.com>:
>> I set up Apache rewrite rules so that page URLs can be easily remembered.
>> The URL of page "myPage" in group "myGroup" will be:
>> http://myWikiSite/myGroup/myPage
>> Now I would like to display this URL somewhere on top of each page. I had
>> not difficulty constructing it in config.php.  Now, can it be displayed?
>> I am using the "blix" skin with customized css and logo for each group,
>> which means I have files such as myGroup.css, and myGroup.php and
>> myGroup.SideBar.
>> I tried to modify things in /skins/blix/skin.php and /skins/blix/
>> skin.tmpl but nothing worked.
>> Another idea is: can we retrieve the page name and group name to
>> construct the URL and display it as an active link in the page header or
>> footer?
>> It would be such a useful feature that I am convinced there is a simple
>> solution.
>> Bernard Bel
>> Laboratoire Parole et Langage
>> http://lpl-aix.fr
>> UMR 6057 CNRS - Université de Provence
>> Centre de Ressources pour la Description de l'Oral (CRDO)
>> http://crdo.fr

More information about the pmwiki-users mailing list