Amit Patel wrote:

> I have following site structure
> [code]
> Home
> |---New Overview
> ....|--News 1
> ....|--News 2
> ....|--News 3
> ....|--News 4
> [/code]
>
> How can I get list of all news items in a model class?

If you know the items are under a fixed path, you can run a JCR query for nodes 
under that path. But you could also for instance look for all pages with a 
specific template under a specific node (or site homepage node for instance). 
It kind of depends on what you actually want to query for. QueryUtil is 
probably a good class to use in your model class. Or you can use ContentUtil 
and its methods for visiting children, but in our experience JCR queries 
perform a lot better.

Nils.
------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------


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

Reply via email to