and on top of that to retrieve nodes that 

>have changes and are not yet activated.

you can follow something along this

if (getIsActivated() && getModificationDate() != null && 
getModificationDate().after(getLastActionDate())) 

in other words the main rule is mgnl:lastaction < mgnl:lastmodified, see 
MetaData#getActivationStatus()

http://svn.magnolia-cms.com/svn/community/magnolia/trunk/magnolia-core/src/main/java/info/magnolia/cms/core/MetaData.java


-zdenek

P.S. It would be really appreciated if you could put it to 
wiki.magnolia-cms.com afterwards.

On Tue, 2011-01-18 at 12:28 +0000, Unger, Richard wrote:
> Hi Frank!
> 
>  
> 
> The Node-Metadata contains a field “mgnl:activated”.
> 
> Programmatically, you should be able to check this using something like:   
> content.getMetadata().isActivated()
> 
> As a JCR-Query (here in XPath Syntax) the following should give you a list of 
> pages not yet activated:
> 
>  
> 
> /jcr:root/mysite//element(*,mgnl:content)[MetaData/@mgnl:activated = "false"]
> 
>  
> 
> (Replace “mysite” with your site’s root node name…)
> 
>  
> 
> Regards from Vienna,
> 
> 
> Richard
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Von: [email protected] 
> [mailto:[email protected]] Im Auftrag von frank rittinger
> Gesendet: Dienstag, 18. Jänner 2011 12:26
> An: [email protected]
> Betreff: [magnolia-user] find not activated nodes
> 
> 
>  
> 
> Hi list,
> 
>  
> 
> I’m twisting my brain to find a way to get all nodes of my website that have 
> changes and are not yet activated.
> 
>  
> 
> Is there a feature built-in or does anyone have a JCR query to find those 
> nodes?
> 
>  
> 
> Best regards,
> 
>  
> 
> Frank
> 
> 
> _____________________________________________________________________
> 
> 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 18.01.2011 12:25 von rittinger frank
> Validation-Code: 2475777544171
> 
> 
> 
> 
>                                    
> ______________________________________________________________________
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> 
> 
> 
> 
> 
> ______________________________________________________________________
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------



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