We've been playing around the Profiler and Folder stuff to implement our
portal navigation and we came across this oddity:

If I put this code in my page decorator velocity template

Parent Folder
$parentFolder

Parent Folder Children
#foreach($obj in $site.parentFolder.Folders(true).iterator())
$obj
#end

Siblings
#foreach($obj in $site.siblingFolders.iterator())
$obj
#end


I get the following results, as guest, default profiler settings:

In default page:

Parent Folder
$parentFolder

Parent Folder Children

Siblings
/folder1
/folder2
/folder3

In default page of folder1:

Parent Folder
/

Parent Folder Children
/folder1
/folder2
/folder3
/_user
/_role

Siblings

That means that contrary to my expectations,
$site.parentFoler.Folders is not equal to $site.siblingFolders

or said differently the children folders of my parent folder are
not my sibling folders !

I guess this is mostly a semantic issue but I believe the API
should make it clearer what we are calling parentFolder and
siblingFolders.

My understanding is that :
$site.parentFolder = the parent folder of the current *folder*
$site.siblingFolders = the siblings folders of the current *page*

I believe we should stick to having the same reference point, either
current page or current folder.
What do you think ?

--
Raphael Luta - [EMAIL PROTECTED]
Apache Jetspeed - Enterprise Portal in Java
http://portals.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to