[pmwiki-users] Self-referencing link from the sidebar?? Possible????
Neil Herber (nospam)
nospam at eton.ca
Fri Dec 15 11:39:30 PST 2023
While waiting for the mailing list, I found the solution!
[[{*$FullName}?userlang=en|Switch to English]]
As described in the Special references section of
https://www.pmwiki.org/wiki/PmWiki/PageVariables
> Prefixing the variable name with an asterisk (*) means the variable's
> value is related to the browsed page or main (body) page.
Thanks!
Neil
On 2023-12-15 12:38 PM, Neil Herber (nospam) wrote:
> I am using the Multilanguage recipe to switch between French and
> English on this site:
>
> https://hambone.ca/index.php/CSM2024/HomePage
>
> I want the "switch link" to appear at the top of the sidebar. So if a
> person is on any of the pages in the CSM2024 group, they will stay on
> that page, but the text will switch language.
>
> However, when I use a switch like:
>
> [[{$FullName}?userlang=en|Switch to English]]
>
> The {$FullName} page variable resolves to "SideBar" rather than
> "TheDisplayedPage" and the user gets taken to the SideBar page.
>
> As a workaround, I have set the switch as follows:
>
> [[HomePage?userlang=en|Switch to English]]
>
> but that moves the viewer away from the page they were on.
>
> Is there a way to specify the "TheDisplayedPage" rather than the
> "SideBar" ???
>
> Neil
>
> PS: The PmWiki site itself seems to be rendering pages very slowly.
> About 20 to 30 seconds for a direct URL.
>
> N
>
--
Neil Herber
More information about the pmwiki-users
mailing list