Add some links in a panel and display them only in a particular page

Version 4.1 by Buzila Vlad on 2016/05/31

As a user which wants to display a panel with links to pages only on a particular page you must follow the following :

 1) Create a new panel with this code content :

#if ($doc.fullName == "Main.WebHome")
* [[News>>Blog.News]]
** [[Iasi>>Blog.Iasi]]
#if ($xwiki.hasAdminRights())
[[$services.localization.render('xe.panels.edit')>>path:${xwiki.getURL('Panels.newtwo', 'inline')}]]

Pages Blog.News and Blog.Iasi must exist when calling them 

#if ($doc.fullName == "Main.WebHome")
should be put in order to show panel only on home page

Final panel creation should resamble the following :


 2) Add the panel to the desired column from Administration - Page Elements - Panels displayed on right column :


 3) Navigate on Main.WebHome in order to see the panel only on homepage . 


In the previous example it was used Main.WebHome as page to display the panel but it can be used any other page from your wiki . 


Get Connected