[pmwiki-devel] Title link in skin template

Hans design5 at softflow.co.uk
Sun Nov 26 07:17:25 CST 2006


Replacing the HTML link in the skin template with a $TitleFmt
variable, defined in skin.php, I need to add ?action=browse to
$PageUrl in order to make the link go to view the page, from a view
resulting from a search query. I wonder why?

Previous in skin template:
<h1><a class='titlelink' href='$PageUrl'>$Titlespaced</a></h1>

After a search query with results displayed on the page, clicking the
link takes you back to view page mode, as desired.

New in skin template:
$TitleFmt

and new in skin.php:
$title = PageVar($pagename, '$Titlespaced');
SDV($TitleFmt, "<h1><a class='titlelink' href='$PageUrl'>$title</a></h1>");

After a search query with results displayed on the page, clicking the
link will result in another query of the same, the query string is
still in the url.

Only changing the link to href='$PageUrl?action=browse'
takes you back to view the page, but you have the page url with the
appendix ?action=browse, which I don't like too much.

Is there away to avoid this?


 Hans




More information about the pmwiki-devel mailing list