General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
Panels
▼
:
Document Index
»
Page:
PanelLayoutUpdate
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Panels
»
Panel Layout Update
Wiki source code of
Panel Layout Update
Last modified by
Administrator
on 2006/12/15 03:10
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
#set($place = $request.place) ## ## Get the preferences document where the new layout must be saved (XWiki.XWikiPreferences or Space.WebPreferences) ## #if("$!{request.prefsdoc}" != "") #set($prefsdocument = $request.prefsdoc) #else #set($prefsdocument = "XWiki.XWikiPreferences") #end ## ## Check to see if the current user has admin rights on the current preferences document. ## #if(!$xwiki.hasAccessLevel("admin", $context.user, $prefsdocument)) #xwikimessageboxstart("$msg.get('panelwizard.placemanager')" "") $msg.get("panelwizard.notadmininplace", $place) #xwikimessageboxend() ## ## Set the current panel layout. Note that you must have at least one panel in the new layout column (left or right panels) to keep the layout. ## #elseif($request.xpage && $request.xpage == "plain") #if( (!$place) || ($place == "") ) #set($prefsdoc = $xwiki.getDocument($prefsdocument)) #set($ok = $prefsdoc.use("XWiki.XWikiPreferences")) #set($leftPanels = $request.leftPanels) #set($rightPanels = $request.rightPanels) #set($showLeftPanels = $request.showLeftPanels) #set($showRightPanels = $request.showRightPanels) #if($leftPanels) #set($ok = $prefsdoc.set("leftPanels", $leftPanels)) #end #if($showLeftPanels) #set($ok = $prefsdoc.set("showLeftPanels", $showLeftPanels)) #end #if($rightPanels) #set($ok = $prefsdoc.set("rightPanels", $rightPanels)) #end #if($showRightPanels) #set($ok = $prefsdoc.set("showRightPanels", $showRightPanels)) #end #set($ok = $prefsdoc.save()) SUCCESS #else #set($prefsdoc = $xwiki.getDocument("${place}:${prefsdocument}")) #set($ok = $prefsdoc.use("XWiki.XWikiPreferences")) #set($leftPanels = $request.leftPanels) #set($rightPanels = $request.rightPanels) #if($leftPanels&&$leftPanels!="") #set($ok = $prefsdoc.set("leftPanels", $leftPanels)) #end #if($rightPanels&&$rightPanels!="") #set($ok = $prefsdoc.set("rightPanels", $rightPanels)) #end #set($ok = $prefsdoc.save()) SUCCESS #end #else 1 $msg.get("panelwizard.panellayoutupdate") #set($url = $xwiki.getURL("Panels.PanelWizard")) #warning($msg.get("panelwizard.nodirectaccess", ["<a href='$url'>Panel Wizard</a>"])) #end
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox