[pmwiki-users] Swapping $WikiTitle, $Group, $Title

Petko Yotov 5ko at 5ko.fr
Tue May 12 07:35:49 PDT 2020

I would not recommend editing a core skin, you should copy the skin 
directory to a new name say "pmwiki/pub/skins/myskin", make your changes 
to the new skin and set the $Skin variable accordingly.

Alternatively, there is a way to inject a small JavaScript that can 
rewrite the document title:

   $HTMLFooterFmt['rewrite-title'] = '<script>
     document.title = document.title.replace(/^([^|]*)\|([^|]*)/, "$2 | 

This will only work when JavaScript is enabled in the browser; 
thankfully most of today's search engine bots do have JavaScript 

This should also work when you are in ?action=edit and the title looks 

   WikiTitle | Main / WikiSandbox | Edit

will become
   Main / WikiSandbox | WikiTitle | Edit


On 11/05/2020 20:09, Robert Riebisch wrote:
> Besides copying and editing the default skin, is there another way to
> swap $WikiTitle, $Group, $Title? Perhaps via config.php.
> I want "fooWiki | Main / HomePage" to become "Main / HomePage | 
> fooWiki"
> or "HomePage \ Main | fooWiki".

More information about the pmwiki-users mailing list