Not able to reach data node when using cms.query
------------------------------------------------
Key: DOCU-132
URL: http://jira.magnolia-cms.com/browse/DOCU-132
Project: Documentation
Issue Type: Development Support Request
Security Level: Public
Components: content, templating
Environment: Magnolia Enterprise Bundle 4.4.1 in a Win2008 environment.
Reporter: Paulo Ferreira
Assignee: Antti Hietala
Hello, I tried to use the following code on a query to get the child pages from
the "news" folder. I got a result of my child pages, but I've also got the
"news" page included. According the XPath, I should only get the child pages.
Or I'm missing something ? The other point is that I could not reach the node
that is contained inside each page, in fact, I couldn't find any documentation
telling how to do it. I've even tried some other properties related to the
page, but the only one I could get was page.title. Any clues or a link with
some examples or explanation ?
I've also tried to order the search, but no success. I guess my jcr lib tag is
wrong.. do you know where I could find more info about this one ?
Thanks for you help,
Paulo.
<%@ taglib uri="cms-taglib" prefix="cms" %>
<%@ taglib uri="cms-util-taglib" prefix="cmsu" %>
<%@ taglib uri="jcr-taglib" prefix="jcr" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html><body>
<cms:query query="home/com/news/*" var="results" />
<c:forEach items="${results}" var="page">
${page.title}</br>
</c:forEach>
</body></html>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------