Hi,
Couldn't changing the skin/look and feel of a page be done from a menu pull
down/ selection to make that functionality more accessible to non-coders?
Regards,
Richard
-----Original Message-----
From: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org]On Behalf
Of Sergiu Dumitriu
Sent: 15 March 2008 05:59
To: XWiki Users
Subject: Re: [xwiki-users] changing some layout details in a single page
[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/
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
Thales UK Ltd (Wells) DISCLAIMER: The information contained in this e-mail
is confidential. It may also be legally privileged. It is intended only for
the stated addressee(s) and access to it by any other person is
unauthorised. If you are not an addressee, you must not disclose, copy,
circulate or in any other way use or rely on the information contained in
this e-mail. Such unauthorised use may be unlawful. We may monitor all
e-mail communications through our networks. If you have received this e-mail
in error, please inform us immediately on +44 (0) 1749 672081 and delete it
and all copies from your system. We accept no responsibility for changes to
any e-mail which occur after it has been sent. Attachments to this e-mail
may contain software viruses which could damage your system. We therefore
recommend you virus-check all attachments before opening. A business of
Thales UK Ltd. Registered Office: 2 Dashwood Lang Road, The Bourne Business
Park, Addlestone, Weybridge, Surrey KT15 2NX Registered in England No.
868273