Commit 54a6094f authored by Bert Leunis's avatar Bert Leunis

ESSENTIALS-1033 change markup of menu plugin templates so the result is always a single dom element

parent e0f32703
......@@ -2,32 +2,38 @@
<#-- @ftlvariable name="menu" type="org.hippoecm.hst.core.sitemenu.HstSiteMenu" -->
<#if menu??>
<nav class="navbar navbar-default has-edit-button">
<ul class="nav navbar-nav">
<nav class="navbar navbar-default has-edit-button">
<ul class="nav navbar-nav">
<#list menu.siteMenuItems as item>
<#if !item.hstLink?? && !item.externalLink??>
<#if item.selected || item.expanded>
<li class="active"><div style="padding: 10px 15px;">${item.name?html}</div></li>
<#else>
<li><div style="padding: 10px 15px;">${item.name?html}</div></li>
</#if>
<#if !item.hstLink?? && !item.externalLink??>
<#if item.selected || item.expanded>
<li class="active">
<div style="padding: 10px 15px;">${item.name?html}</div>
</li>
<#else>
<#if item.hstLink??>
<#assign href><@hst.link link=item.hstLink/></#assign>
<#elseif item.externalLink??>
<#assign href>${item.externalLink?replace("\"", "")}</#assign>
</#if>
<#if item.selected || item.expanded>
<li class="active"><a href="${href}">${item.name?html}</a></li>
<#else>
<li><a href="${href}">${item.name?html}</a></li>
</#if>
<li>
<div style="padding: 10px 15px;">${item.name?html}</div>
</li>
</#if>
<#else>
<#if item.hstLink??>
<#assign href><@hst.link link=item.hstLink/></#assign>
<#elseif item.externalLink??>
<#assign href>${item.externalLink?replace("\"", "")}</#assign>
</#if>
<#if item.selected || item.expanded>
<li class="active"><a href="${href}">${item.name?html}</a></li>
<#else>
<li><a href="${href}">${item.name?html}</a></li>
</#if>
</#if>
</#list>
</ul>
<@hst.cmseditmenu menu=menu/>
</nav>
</ul>
<@hst.cmseditmenu menu=menu/>
</nav>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/menu.png" />"> Click to edit Menu
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/menu.png" />"> Click to edit Menu
</div>
</#if>
\ No newline at end of file
......@@ -2,32 +2,38 @@
<#-- @ftlvariable name="menu" type="org.hippoecm.hst.core.sitemenu.HstSiteMenu" -->
<#if menu??>
<div class="has-edit-button">
<div class="has-edit-button">
<ul class="nav nav-pills nav-stacked">
<#list menu.siteMenuItems as item>
<#if !item.hstLink?? && !item.externalLink??>
<#if item.selected || item.expanded>
<li class="active"><div style="padding: 10px 15px;">${item.name?html}</div></li>
<#else>
<li><div style="padding: 10px 15px;">${item.name?html}</div></li>
</#if>
<#else>
<#if item.hstLink??>
<#assign href><@hst.link link=item.hstLink/></#assign>
<#elseif item.externalLink??>
<#assign href>${item.externalLink?replace("\"", "")}</#assign>
</#if>
<#if item.selected || item.expanded>
<li class="active"><a href="${href}">${item.name?html}</a></li>
<#else>
<li><a href="${href}">${item.name?html}</a></li>
</#if>
</#if>
</#list>
<#list menu.siteMenuItems as item>
<#if !item.hstLink?? && !item.externalLink??>
<#if item.selected || item.expanded>
<li class="active">
<div style="padding: 10px 15px;">${item.name?html}</div>
</li>
<#else>
<li>
<div style="padding: 10px 15px;">${item.name?html}</div>
</li>
</#if>
<#else>
<#if item.hstLink??>
<#assign href><@hst.link link=item.hstLink/></#assign>
<#elseif item.externalLink??>
<#assign href>${item.externalLink?replace("\"", "")}</#assign>
</#if>
<#if item.selected || item.expanded>
<li class="active"><a href="${href}">${item.name?html}</a></li>
<#else>
<li><a href="${href}">${item.name?html}</a></li>
</#if>
</#if>
</#list>
</ul>
<@hst.cmseditmenu menu=menu/>
</div>
</div>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/menu.png" />"> Click to edit Menu
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/menu.png" />"> Click to edit Menu
</div>
</#if>
\ No newline at end of file
......@@ -2,32 +2,38 @@
<#-- @ftlvariable name="menu" type="org.hippoecm.hst.core.sitemenu.HstSiteMenu" -->
<#if menu??>
<div class="has-edit-button">
<div class="has-edit-button">
<ul class="nav nav-pills">
<#list menu.siteMenuItems as item>
<#if !item.hstLink?? && !item.externalLink??>
<#if item.selected || item.expanded>
<li class="active"><div style="padding: 10px 15px;">${item.name?html}</div></li>
<#else>
<li><div style="padding: 10px 15px;">${item.name?html}</div></li>
</#if>
<#else>
<#if item.hstLink??>
<#assign href><@hst.link link=item.hstLink/></#assign>
<#elseif item.externalLink??>
<#assign href>${item.externalLink?replace("\"", "")}</#assign>
</#if>
<#if item.selected || item.expanded>
<li class="active"><a href="${href}">${item.name?html}</a></li>
<#else>
<li><a href="${href}">${item.name?html}</a></li>
</#if>
</#if>
</#list>
<#list menu.siteMenuItems as item>
<#if !item.hstLink?? && !item.externalLink??>
<#if item.selected || item.expanded>
<li class="active">
<div style="padding: 10px 15px;">${item.name?html}</div>
</li>
<#else>
<li>
<div style="padding: 10px 15px;">${item.name?html}</div>
</li>
</#if>
<#else>
<#if item.hstLink??>
<#assign href><@hst.link link=item.hstLink/></#assign>
<#elseif item.externalLink??>
<#assign href>${item.externalLink?replace("\"", "")}</#assign>
</#if>
<#if item.selected || item.expanded>
<li class="active"><a href="${href}">${item.name?html}</a></li>
<#else>
<li><a href="${href}">${item.name?html}</a></li>
</#if>
</#if>
</#list>
</ul>
<@hst.cmseditmenu menu=menu/>
</div>
</div>
<#-- @ftlvariable name="editMode" type="java.lang.Boolean"-->
<#elseif editMode>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/menu.png" />"> Click to edit Menu
<div>
<img src="<@hst.link path="/images/essentials/catalog-component-icons/menu.png" />"> Click to edit Menu
</div>
</#if>
\ No newline at end of file
......@@ -38,5 +38,7 @@
</c:if>
<%--@elvariable id="editMode" type="java.lang.Boolean"--%>
<c:if test="${requestScope.editMode && empty requestScope.menu}">
<img src="<hst:link path='/images/essentials/catalog-component-icons/menu.png'/>"> Click to edit Menu
<div>
<img src="<hst:link path='/images/essentials/catalog-component-icons/menu.png'/>"> Click to edit Menu
</div>
</c:if>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment