I have a facelet template that has a menu along with other things not included in the code below:
<h:head>
..............................
</h:head>
<h:body>
<ui:include src="/menu.xhtml" />
..............................
..............................
<h:body>
This template is used by all of my pages around 30:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
template="/layout/template.xhtml">
</ui:composition>
There are very few pages that need to use everything in the template except the menu. Is there a way to specify from those pages not to show the menu.
I am looking for a way in facelets, like passing a facelet param or something. I have thought of the following options but I am trying to avoid them:
- Create another template exactly like the existing one but without the menu and use it in those pages
- Take the menu out of the template and use on the needed pages but that would mean adding the menu to around 25 pages, I would like to keep the menu in the template.
[jsf]
tag. – BalusC Oct 11 '12 at 17:11