I have some news items in my news.newsCollection. This is the ftl code I 
currently use to display them:

[code][#assign newsItems=mgnl.inherit(content).news.newsCollection /]
[#list newsItems?children! as kid]
  ${kid.title!}
[/#list][/code]

But I would like to limit the displayed items to 2. For the life of me I can't 
get my JCR query to work. This is what I am trying:

[code][@cmsu.simpleSearch query="select * from mgnl:contentNode where jcr:path 
like '/myProject/news/newsCollection/%'" itemType="mgnl:contentNode" 
var="results" useSimpleJcrQuery=true /]
[#list results as kid]
  ${kid}
[/#list][/code]

... and nothing is shown. I am importing the m?cmsu tag properly (when I don't 
an error is displayed). But nothing is shown on the page. I find it hard to 
find much information in the JCR documentation.

Can someone give me a hand with this query?

Thanks!

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=75f65c2b-34fe-4f10-aec6-ae404eae237e


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to