Commit d12fdcf3 authored by Bert Leunis's avatar Bert Leunis

ESSENTIALS-1033 change markup of search plugin templates so the result is...

ESSENTIALS-1033 change markup of search plugin templates so the result is always a single dom element
parent b2c336b8
......@@ -6,23 +6,23 @@
<#if pageable.total == 0>
<h3>No results for: ${query?html}</h3>
<#else>
<#list pageable.items as item>
<#if item.title??>
<#assign linkName=item.title/>
<#else>
<#assign linkName=item.localizedName/>
<div>
<#list pageable.items as item>
<#if item.title??>
<#assign linkName=item.title/>
<#else>
<#assign linkName=item.localizedName/>
</#if>
<article>
<@hst.cmseditlink hippobean=item/>
<@hst.link var="link" hippobean=item />
<h3><a href="${link}">${linkName?html}</a></h3>
</article>
</#list>
<#if cparam.showPagination>
<#include "../include/pagination.ftl">
</#if>
<article>
<@hst.cmseditlink hippobean=item/>
<@hst.link var="link" hippobean=item />
<h3><a href="${link}">${linkName?html}</a></h3>
</article>
</#list>
<#if cparam.showPagination>
<#include "../include/pagination.ftl">
</#if>
</div>
</#if>
<#else>
<h3>Please fill in a search term.</h3>
......
......@@ -10,25 +10,26 @@
<h3>No results for: <c:out value="${requestScope.query}"/></h3>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${requestScope.pageable.items}" varStatus="status">
<c:choose>
<c:when test="${hst:isReadable(item, 'title')}">
<c:set var="linkName" value="${item.title}"/>
</c:when>
<c:otherwise>
<c:set var="linkName" value="${item.localizedName}"/>
</c:otherwise>
</c:choose>
<article>
<hst:cmseditlink hippobean="${item}"/>
<hst:link var="link" hippobean="${item}"/>
<h3><a href="${link}"><c:out value="${linkName}"/></a></h3>
</article>
</c:forEach>
<c:if test="${requestScope.cparam.showPagination}">
<%@ include file="/WEB-INF/jsp/include/pagination.jsp" %>
</c:if>
<div>
<c:forEach var="item" items="${requestScope.pageable.items}" varStatus="status">
<c:choose>
<c:when test="${hst:isReadable(item, 'title')}">
<c:set var="linkName" value="${item.title}"/>
</c:when>
<c:otherwise>
<c:set var="linkName" value="${item.localizedName}"/>
</c:otherwise>
</c:choose>
<article>
<hst:cmseditlink hippobean="${item}"/>
<hst:link var="link" hippobean="${item}"/>
<h3><a href="${link}"><c:out value="${linkName}"/></a></h3>
</article>
</c:forEach>
<c:if test="${requestScope.cparam.showPagination}">
<%@ include file="/WEB-INF/jsp/include/pagination.jsp" %>
</c:if>
</div>
</c:otherwise>
</c:choose>
</c:when>
......
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