Hi all
Currently working on a new page template I wanted to reuse the code
from the sample search page, which actually produced search hits.
But after copy-n-pasting the relevant code to the new template it only
gives me "No results" for all the searches.
Changing the search scope from "page" to "application" doesn't help
either.
What am I missing here?
I've created a search page using the new template "swisstradeSearch"
swisstradeSearch is mapped to
/templates/jsp/swisstrade/v1/search/search.jsp
search.jsp imports <c:import
url="/templates/jsp/swisstrade/v1/global/columnMainSearch.jsp" />
columnMainSearch.jsp contains the search code from
samples/search/search.jsp
<form name="mgnlsearch" action="">
<input name="query" id="query" value="${param.query}" />
<input name="search" type="submit" value="search" />
</form>
<c:if test="${!empty(param.query)}">
<h1>Search results for:</h1>
<h2>${param.query}</h2>
<cmsu:simpleSearch query="${param.query}" var="results"
scope="application" />
<c:if test="${empty(results)}">
<p>No results</p>
</c:if>
<c:forEach var="node" items="${results}">
<div class="searchresult">
<h4>${node.title}</h4>
<p>
<cmsu:searchResultSnippet query="${param.query}"
page="${node}" />
</p>
<a
href="${pageContext.request.contextPath}${node.handle}.html">${pageConte
xt.request.contextPath}${node.handle}.html</a>
<em>last modification date: <fmt:formatDate dateStyle="full"
value="${node.metaData.modificationDate.time}" /></em>
</div>
</c:forEach>
</c:if>
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------