On Tue, Jan 16, 2007 at 09:53:46AM +0900, Shigeru Kobayashi wrote:
> Hello,
> 
> I have a question about how to put language selection buttons. I have
> been using multilang recipe to let the user to select a language.
> 
> I have been working on creating new skin with a web designer, and he
> asked me to generate HTML as follows:
> <div id='wikihead'>
>       <div id='language'>
>       <a href='http://url/of/the/page?userlang=ja'><img
> src="http://url/to/the/file/ja.png"; /></a>
>       </div>
>       ...
> 
> I wrote in the template file as follows:
> <div id='wikihead'>
>       <!--wiki:Site.LanguageButtons-->
>       ...
> 
> And I wrote in the 'Site/LanguageButtons' as follows:
> >>id = "language"<<
> (:if userlang en:)
> [[{$PageUrl}?userlang=ja|Attach:Main/ja.png]]

Use {*$PageUrl} instead (note the asterisk).
This tells PmWiki to use the url of the page being
displayed, as opposed to url of the page containing
the markup.

It would be a _really_ good idea for us to update the
PmWiki.PageVariables page to explain this, at least with a 
FAQ if nothing else.

Pm

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to