Panels Application
This application is bundled with:
This application can be downloaded .
- XWiki Enteprise
- XWiki Enterprise Manager
- XWiki Watch
This application can be downloaded .
Panels Application
Provides various Panels that can be placed in menu placeholders on the screen (left or right menus or even inside content of pages). Also provides a WYSIWYG Panel Wizard to choose a Panel layout (left menu, right menu or both) and the Panels to display.
Panels : definition
A Panel is a menu that allows various actions in the wiki : navigation, searches, page creation, statistics display. Panels generally contain clickable links. These links are written manually or are automatically generated by scripts. A full set of Panels is available by default, designed for the main uses. Furthermore, it is possible to create new Panels for specific needs. Panels can be set in various positions within your wiki interface : columns on the right, on the left, or both. You can go to the administration to make these settings. This means that in order to create, modify or set Panels, you need to have administration rights.Access to the Panels list
Where to find them
Panels are stored in their own space, "Panels". URL: http://<server>/xwiki/bin/view/Panels/ You can retrieve that space easily by typing in the search engine the word "Panels". You can also simply use the Dashboard and click on the Panels space (provided you are in Advanced user mode since otherwise we're masking that technical space for simple users - See Page Editing for more details).Panels space's home page
This home page shows a list of the available Panels, containing:- a description
- a visualization link (clicking the Panel's name displays its location page)
- an edition link ("Edit" : the Panel opens in form edition mode, giving you access to the settings fields)
- a deletion link ("Delete" : deletes the Panel's page)
Panel's structure
Take a look at the "QuickLinks" panel in the list. We will use it as an example. Click the panel's name (URL: http://<server>/xwiki/bin/view/Panels/QuickLinks) Click the edit link > allows you to see the different fields in order to edit the panel. You can fill in or select these fields :
Warning: the panel content is in 1.0 wiki syntax: more about syntax 1.0.
"Name" field
The name of the wiki page where the panel is stored. Here the name is: "QuickLinks"."Type" field
There are two available options : "view" or "edit". According to your selection, the panel will be displayed when the wiki page is either in view mode or in edit mode. Most of the panels are used in view mode. For the new panel you're creating, leave the selector on "view"."Category" field
Panels are sorted by category according to their purpose. The categories are:| Category | Panel's name |
|---|---|
| Information | Recently Modified |
| Information | Quick Links |
| Navigation | Archives Panel |
| Navigation | Navigation |
| Tools | New Page |
| Tools | Search |
| Administration | (empty category as of today) |
| Other | (empty category as of today) |
"Description" field
Contains a short description of the wiki. This text will appear in the panels space home page."Content" field
This section contains the panel's code. You can see here four links identified by this symbol at the beginning of the line. They are targeting:- the wiki's home page ("Main.WebHome")
- the page that lists every document in the wiki ("Main.Index")
- the blog space home page ("Blog.WebHome")
- the sandbox space home page ("Sandbox.WebHome")
Creation - Edition
Introduction
To create or to modify panels, you need to have administration rights.Create a new panel
Go to this page : http://<server>/xwiki/bin/view/Panels/ In the field "Create new panel" type the name of your new panel, for instance "User Guide". Click the "Create" button in order to open the creation's panel form. Notice that this page has been created under http://<server>/xwiki/bin/view/Panels/User+GuideNew panel creation form
Now you have the panel creation form on your screen, in edition mode. If this is not the case, please go back to the previous section. Fill in or select the following sections : "Name", "Type", "Category" and "Description" according to the information already presented in the previous section ("Panel's structure)."Content" field
By default, two lines are displayed in this section:#panelheader('User Guide')
#panelfooter()Editing the panel's header
#panelheader allows you to change the name displayed in the panel's header. If User Guide is ok, leave it as it is : by default those words have been automatically inserted when you created the panel a few minutes ago."Content" field: create a new link
The code of the link will take place between #panelheader('User Guide') and #panelfooter() . For instance, if you want to create a link to the sandbox space home page, type:#panelheader('User Guide')
* [Accueil Sandbox>Sandbox.WebHome]
#panelfooter()#panelheader('User Guide')
* [Accueil Sandbox>Sandbox.WebHome]
* [Blog>Blog.WebHome]
#panelfooter()Configuration and set up
Introduction
There are different ways to configure panels. To modify the panels positions you must have administration rights. The configuration can be set at different scales : for all the wiki or at a space level. For instance, the following panels : "Archives", "Categories", "Recent Posts", "Unpublished" are specific to the Blog space.Administration section: "presentation" category
In your browser, Click the "Administration" in the right top corner. This page allows you to set your preferences for the entire wiki or for a specific space. In the top part of the page, a select list is available (grey background). The select list allows you to choose at which level you want to set your preferences.
Click on the presentation icon. The fields used to control panels are located in the "Panels" subsection.
In the graphic above, panels are configured for display in the right column.
The selected panels are listed in the Show Right Panels field. Here the panels selection is "Search", "Quicklinks", "Create".
Don't forget to click "Save" to apply your new preferences.
Warning: The "Search", "Quicklinks" and "Create" panels have been selected for the new configuration. Panel names have to be typed in the following manner : "Panels.NameOfThePanel". The word "Panels" corresponds to the name of the space where Panels are stored. For instance, in order to set the Quick Links panel (URL : http://<server>/xwiki/bien/view/Panels/QuickLinks) type Panels.QuickLinks in the field. Switch the slash [ / ] with a dot [ . ]
Editing panels layout
If you want to configure all the panels in the left column, you should select "yes" for the field "Show left panels". Copy / paste the three items contained in the field "Right Panels" into the field "Left Panels". After this select "no" for the "Show left panels" field. Don't forget to click "Save" to apply your new preferences.Controlling where to display Panels
Panels can be configured to be displayed at the wiki level (i.e. all pages) by using the Panel Wizard as mentioned above. It's also possible to override the Panels to be displayed at the Space level (again using the Panel Wizard but from that Space's administration page). If you need finer-grained control such as displaying a Panel only for a given page, you'd need to edit the Panel and add a condition in the Panel's script content. For example imagine you'd like to display the "My Recent Modifications" Panel only for the Home Page (Main.WebHome). To do so edit the Panel (http://<server>/xwiki/bin/inline/Panels/MyRecentModifications) and modify the content as follows:#if ($doc.fullName == "Main.WebHome")
#set($recentDocs = $xwiki.searchDocuments("where 1=1 and doc.author='$context.user' order by doc.date desc", 5, 0))
…
#end