[pmwiki-users] A question about how to resolve a {$PageUrl} in a template
Shigeru Kobayashi
kotobuki at gmail.com
Mon Jan 15 18:53:46 CST 2007
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]]
(:if userlang ja:)
[[{$PageUrl}?userlang=en|Attach:Main/en.png]]
(:ifend:)
>><<
That generates HTML as follows:
<div id='wikihead'>
<div id='wikilogo'><a href='http://gainer.cc'><img
src='http://gainer.cc/pmwiki/pub/skins/pmwiki/gainer_logo.png'
alt='GAINER.cc' border='0' /></a></div>
<div id='language' >
<div><a class='urllink'
href='http://gainer.cc/Site/LanguageButtons?userlang=en'
rel='nofollow'><img src='http://gainer.cc/pmwiki/uploads/Main/en.png'
alt='' title='' /></a></div>
</div>
...
It looks mostly OK about structure, but the URL is fixed to that of
'Site/LanguageButtons' page. How can I fix this issue?
I'm sorry for trouble you, but it would be much appreciated if you
give me suggestions about this issue.
--
Shigeru Kobayashi
e-mail: kotobuki at gmail.com
More information about the pmwiki-users
mailing list