[xwiki-users] One wiki in two different layouts
Hello, I would like to ask you about having one instance of xwiki (one database) in two different layouts. I use xwiki for documentation of our product and I need to have two different layouts of xwiki. The first one with all navigation and information panels and the second one only in a simple style without all these panels (e.g. similar to print style (print.css) in xwiki). Do you know if it is possible to have one instance (one database) of xwiki in these two different layouts? Thank you very much for your answer, Zuzana Zapletalova.
Hi Zuzana, XWiki uses skins to customize the layout of the pages. You can look at http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins for more information. A skin can be applied at the space level, so it seems to be what you need : 2 different spaces with different layout in one xwiki instance. A simpler way, if you just want to change the panels, is to define a custom presentation at the space level (in the space administration). Regards, Maxime 2010/10/13 Zuzana Zapletalova <[email protected]>
Hello,
I would like to ask you about having one instance of xwiki (one database) in two different layouts. I use xwiki for documentation of our product and I need to have two different layouts of xwiki. The first one with all navigation and information panels and the second one only in a simple style without all these panels (e.g. similar to print style (print.css) in xwiki).
Do you know if it is possible to have one instance (one database) of xwiki in these two different layouts?
Thank you very much for your answer,
Zuzana Zapletalova. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, Maxime Mathieu wrote:
Hi Zuzana,
XWiki uses skins to customize the layout of the pages. You can look at http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins for more information.
A skin can be applied at the space level, so it seems to be what you need : 2 different spaces with different layout in one xwiki instance.
A simpler way, if you just want to change the panels, is to define a custom presentation at the space level (in the space administration).
Allow me to add two simple but effective tricks, in this cases using some Velocity code, giving the user a nice customized experience: 1. Control what users can see a given panel based on her/his group membership: Sample panel code (after a message from Raluca Stravo; XWiki 1.0 syntax): #set($groupDoc = $xwiki.getDocument("XWiki.TheGroupSeeingThisPanel")) #if($groupDoc.getObject('XWiki.XWikiGroups', 'member', "$context.user")) Panel content #end See also... http://www.xwiki.org/xwiki/bin/view/FAQ/HowCanIMakeContentAppearOnlyForASpec... It seems that isUserInGroup has some issue in 2.4. 2. Apply a different skin on a per page basis. Sample code to be copied in your page (XWiki 1.0 syntax): #if("$!request.skin" != "XWiki.YourSkin") $response.sendRedirect($doc.getURL("view", "skin=XWiki.YourSkin")) #end See... http://www.xwiki.org/xwiki/bin/view/FAQ/Howtoapplyaskinonaperpagebasis Hope this helps! Ricardo -- Ricardo RodrÃguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems
On 10/13/2010 03:40 PM, Zuzana Zapletalova wrote:
Hello,
I would like to ask you about having one instance of xwiki (one database) in two different layouts. I use xwiki for documentation of our product and I need to have two different layouts of xwiki. The first one with all navigation and information panels and the second one only in a simple style without all these panels (e.g. similar to print style (print.css) in xwiki).
Do you know if it is possible to have one instance (one database) of xwiki in these two different layouts?
Thank you very much for your answer,
Yes, you can write two different skins, and switch between them either using user preferences (setting a skin just for one or some users), or programatically on some conditions, by changing templates/stylesheets.vm See http://platform.xwiki.org/xwiki/bin/Features/Skins#HChangingtheSkin -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (4)
-
[Ricardo Rodriguez] eBioTIC. -
Maxime Mathieu -
Sergiu Dumitriu -
Zuzana Zapletalova