[pmwiki-devel] Very obscure skin, jumpbox, search problem
marc
gmane at auxbuss.com
Wed Jan 17 13:34:50 CST 2007
I thought I'd post this as a heads up, though I doubt many folk will
trip over it.
I have a site that uses multiple skins. On some pages there is a
dropdown that uses jumpbox to navigate elsewhere.
Now, say we are on a page with such a dropdown and we use it go to the
home page. The URL when you get to the HP will look something like:
http://www.example.com/SomeGroup/JumpFormHerePage?n=Main.HomePage
Should you now do a search on this (home) page, then the results will
appear on a page that uses the skin from the original page. This can
either be confusing or, when the skins are totally different, rather
nasty.
My workaround is to force all search results into Site.Search via the
following (from Pm) in config.php:
if ($action == 'search') {
$pagename = ResolvePageName($pagename);
if ($pagename != 'Site.Search') {
$qs = preg_replace('/\\bn=[^&?]*/', '', @$_SERVER
['QUERY_STRING']);
Redirect('Site.Search', "\$PageUrl?$qs");
}
}
Of course, this might not be what you want, but at least it's
consistent.
If there's a way to avoid this, then I'd love to hear about it.
--
Cheers,
Marc
More information about the pmwiki-devel
mailing list