[pmwiki-users] Swapping $WikiTitle, $Group, $Title
5ko at 5ko.fr
Tue May 12 07:42:56 PDT 2020
I see that you want Name / Group | WikiTitle, use this code instead:
$HTMLFooterFmt['rewrite-title'] = '<script>
document.title.replace(/^([^|]*)\|([^\\/]+)\/([^|]*)/, "$3 / $2 | $1");
here $3 will be the name, $2 the group and $1 the WikiTitle -- mix and
match. To have a single backslash, double it.
On 12/05/2020 16:35, Petko Yotov wrote:
> 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.
> rewrite the document title:
> $HTMLFooterFmt['rewrite-title'] = '<script>
> document.title = document.title.replace(/^([^|]*)\|([^|]*)/, "$2 |
> 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 |
>> or "HomePage \ Main | fooWiki".
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
More information about the pmwiki-users