##1.1 Panel List
Drag and drop panels to rearrange them inside a column or between columns. To add or remove panels, drag them from the list of available panels to one of the columns or from the column into the list, respectively.
#set($panelClass = $xwiki.getDocument("Panels.PanelClass").xWikiClass)
#set($categoryList = $panelClass.category.getProperty("values").value.split("[|]"))
#set($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='Panels.PanelClass' and doc.fullName!='Panels.PanelTemplate'")
#set($panelsList = $xwiki.searchDocuments($sql))
#set($categoryMap = $xwiki.getHashMap())
#foreach($category in $categoryList)
$!categoryMap.put($category, $xwiki.getArrayList())
#end
#foreach ($item in $panelsList)
#set($obj = $xwiki.getDocument($item).getObject("Panels.PanelClass"))
#if($obj.type == 'view')
#set($arrayList = $categoryMap.get($obj.category))
#if($arrayList)
#set($discard = $categoryMap.get($obj.category).add($item))
## TODO: uncategorized?
#end
#end
#end
##
#set($panelsPerRow = 3)
{pre}
#set($ajaxdoc = $xwiki.getDocument("Panels.AjaxEditor"))
#if($request.place)
#set($ajaxurl = $xwiki.getURL("Panels.PanelLayoutUpdate", "view", "xpage=plain&place=${request.place}"))
#else
#set($ajaxurl = $xwiki.getURL("Panels.PanelLayoutUpdate", "view", "xpage=plain"))
#end
{/pre}
## start of accordion:
#foreach($category in $categoryList)
## start of accordion tab:
$category
## start of accordion tab content:
#set($categPanels = $categoryMap.get($category))
#if($categPanels.size() == 0)
There are no panels from this category.
#else
#foreach ($item in $categPanels)
#set($obj = $xwiki.getDocument($item).getObject("Panels.PanelClass"))
$doc.display("name", $obj)
#if($panelsStatus.get($item) == "false")#displaypanel("$item")#else
#end
#end
#end
## end of accordion tab content:
## end of accorion tab:
## end of foreach:
#end
## end of accordion:
## end of allpanels div
## end of PanelsListSection
##1.1 Page Layout
Choose a page layout:
#set($crtlayout = 0)
#if($showLeftPanels and $showLeftPanels == "1")
#set($crtlayout = $crtlayout + 1)
#end
#if($showRightPanels and $showRightPanels == "1")
#set($crtlayout = $crtlayout + 2)
#end
## xwikieditcontent