[xwiki-users] changing some layout details in a single page
Sergiu Dumitriu
sergiu at xwiki.com
Sat Mar 15 06:58:52 CET 2008
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
> Guillaume Lerouge wrote:
>> What you can do is to append ?skin= at the end of your page name to
>> force it to use that given skin, for instance :
>>
>> mywiki.com/xwiki/bin/view/Main/WebHome?skin=albatross
>> <http://mywiki.com/xwiki/bin/view/Main/WebHome?skin=albatross> (or toucan)
>>
>> Then you can add this code to your selected pages (it's not clean but
>> it will work) :
>>
>> #if(!$request.skin || $request.skin && $request.skin != 'myskin')
>>
>> #set($skin = '?skin=myskin')
>>
>> #set($url = $xwiki.getURL($doc.fullName))
>>
>> #set($pageurl = $url + $skin)
>>
>> $response.sendRedirect($pageurl)
>>
>> #end
A shorter code:
#if("$!request.skin" != "myskin")
$response.sendRedirect($doc.getURL("view", "skin=myskin")
#end
>
> Oh! How powerful is this stuff! The "only" problem is to know how to use
> all the resources this framework provides us.
>
> Don't you think this must go to Code Snippets?
>
> Thank you so much,
>
> Ricardo
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
More information about the users
mailing list