portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaƫl Luta <raph...@apache.org>
Subject Folder semantics issue
Date Thu, 03 Mar 2005 13:56:38 GMT
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 - raphael@apache.org
Apache Jetspeed - Enterprise Portal in Java
http://portals.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message