> I then would like to find all paragraphs on that page, which were created
> using the "newsHeader" paragraph template. I've tried several ways, but
> nothing seems to work. I've also tried STKUtil.getContentListByTemplateName,
> but I'm probably doing something wrong with the Content object I get back by
> these methods?
> 
> How do I go about this?
> 

I believe those STKUtil methods are meant to search for the pages not
for paragraphs. Since you already have a page, you can try to either get
all its paragraphs and iterate through them yourself or you can try to
get QueryManager and search for it using something
like /path/to/the/page/element(*,
mgnl:contentNode)[MetaData/@mgnl:template eq 'myParagraphTemplate']
(wrote that xpath query from top of my head so you might have to tweak
it a bit if it doesn't work straightaway) ... you might also want to
search list archives, there were some posts about searching for pages or
paragraphs by template names.

HTH,
Jan


----------------------------------------------------------------
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