Hi all!!
Little question.
In Site Designer, why mainBar.jsp uses an explicit way of creating main
bar instead of using "standard" cms:mainBar tag?
Sorry if it is not a useful question but I'm curious!
Thanks for any answers!
Matteo
-----[ mainBar.jsp ]-----
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:cms="cms-taglib"
xmlns:cmsu="cms-util-taglib"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<fmt:setBundle basename="ch.esense.module.sitedesigner.messages" />
<jsp:directive.page import="info.magnolia.cms.core.Content" />
<jsp:directive.page import="info.magnolia.cms.util.Resource" />
<jsp:directive.page import="info.magnolia.cms.gui.inline.BarMain" />
<c:set var="editLayoutLabel">
<fmt:message key="editBar.editLabel.pageLayout"/>
</c:set>
<!-- main bar of form template -->
<jsp:scriptlet>
Content currentPage = Resource.getActivePage();
BarMain bar=new BarMain(request);
//path is needed for the links of the buttons
bar.setPath(currentPage.getHandle());
//"paragraph" specifies the paragraph evoked by the "Properties" button
bar.setParagraph("pageProperties");
// initialize the default buttons (preview, site admin, properties)
// note: buttons are not placed through init (see below)
bar.setDefaultButtons();
// to overwrite single properties of the default buttons, use
getButtonXXX() methods:
// bar.getButtonProperties().setLabel("Page properties");
//add customized buttons to the main bar
// places the preview and the site admin button to the very left and
the properties button to the very right
bar.placeDefaultButtons();
//draw the main bar
bar.drawHtml(out);
</jsp:scriptlet>
</jsp:root>
----[ the same, but using tag ]----
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:cms="cms-taglib"
xmlns:cmsu="cms-util-taglib"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<cms:mainBar dialog="pageProperties" />
</jsp:root>
----------------------------------------------------------------
for list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
----------------------------------------------------------------