Wow, I had no idea that there was an Orphaned Pages UI.  Very good  
stuff.  Thanks!

Sam

On Jan 30, 2009, at 11:37 AM, Jerome Velociter wrote:

> Samuel Lee wrote:
>> I stole this from 2 previous emails.  Can someone confirm if this is
>> correct if I want a display of all orphaned pages in my xwiki?
>
> Well, does it do what you expect ? :p
>
> More seriously, it looks ok (though I don't understand why you display
> the document's space/web for each entry). Also, know that there is an
> orphaned pages UI bundled with XWiki Enterprise by default. You'll  
> find
> it in a tab if you follow the "Index" link in the default navigation
> panel displayed on the left.
>
> Jerome.
>
> PS: note that $doc.web is deprecated since a long time now, you should
> use $doc.space instead
>>
>> #set ($sql = "where doc.parent is null or doc.parent=''")
>> #set ($start = 0) #set ($nb = 500)
>> #set($curweb="")
>>
>> #foreach ($item in $xwiki.searchDocuments($sql, $nb , $start))
>> #if ($xwiki.hasAccessLevel("view", "${context.database}:${item}"))
>> #set($bentrydoc = $xwiki.getDocument($item))
>> #if($curweb!=${bentrydoc.web})
>>
>> <div>
>>
>> 1.1 ${bentrydoc.web}
>>
>> </div>
>> #set ($curweb = ${bentrydoc.web})
>>
>> #end
>> * [$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name] by
>> $xwiki.getLocalUserName($bentrydoc.author) on
>> $xwiki.formatDate($bentrydoc.date,"MMMM dd, yyyy HH:mm")
>> <a href="$bentrydoc.getURL("edit")">edit</a>
>> #end
>> #end
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to