Hey Erik,
you know the name of the Article template? The name from the STK-Article is stkArticle. So //element(*,mgnl:content)[MetaData/@mgnl:template='stkArticle'] works fine. patric Von: [email protected] [mailto:[email protected]] Im Auftrag von Erik Alphenaar Gesendet: Dienstag, 20. September 2011 10:23 An: Magnolia User-List Betreff: Re: [magnolia-user] Xpath query filtering out nodes of a specific template Hi all, Thanks for your replies! When you both execute such a query in the "JCR Queries" under "Tools" in the admin central, do you get any results? jackrabbit version: 2.2.7 javax.jcr version : 2.0 Regards, Erik. On Mon, Sep 19, 2011 at 6:15 PM, Unger, Richard <[email protected]> wrote: Hi Erik, The following query works for us: /jcr:root//element(*,mgnl:content)[MetaData/@mgnl:template='lmatArtikel' ] This example returns all pages that have the template "lmatArtikel". We're on EE 4.4.2. Regards from Vienna, Richard Von: [email protected] [mailto:[email protected]] Im Auftrag von Erik Alphenaar Gesendet: Montag, 19. September 2011 16:14 An: Magnolia User-List Betreff: [magnolia-user] Xpath query filtering out nodes of a specific template Hi there, I am probably doing something terribly wrong, but I can't seem to find a query that is working, based on my numerous searches in documentation. - I am using the admincentral to check my queries - I use OpenUtils JCRCriteriaFactory.createDirectJcrQuery to create pageable results in our apps - It needs to be an xpath query, no sql - repository: website - returning nt:base for now I have tried: /jcr:root//*/MetaData[@mgnl:template='article'] /jcr:root//*[MetaData/@mgnl:template='article'] /jcr:root//*[@mgnl:template='article'] to no avail... while /jcr:root//*/MetaData nicely returns all MetaData nodes... Any help would be greatly appreciated!! Regards, Erik Alphenaar JTeam B.V. ________________________________ ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- _____________________________________________________________________ Vorstand: Ralf Heller, Udo Mobes Vorsitzende des Aufsichtsrates: Kirsten Heller Sitz der Gesellschaft: Gruenwaelderstrasse 10-14, D-79098 Freiburg Amtsgericht Freiburg HRB 6218 Versand am 20.09.2011 11:07 von dosch patric Validation-Code: 2730761314003 ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
