If you are NOT depending on the profiler, you can do the following as a workaround:
1. grab the folder or page from the $site variable.
2. use the getParent() method to access the parent folders all the way up to '/'.
3. navigate around the hierarchy from there using getFolders() and getPages().
Again, this will NOT work well if you are using the profiler to define user, role, group, or subsite specific site configurations. It is also relative to the current and root site paths, not a full portal request path. I am guessing you can work around that as needed to generate breadcrumbs, (see the absolute URL generation methods on the $jetspeed object).
I am attempting to get support for this kind of site access in place for M2.
Randy
zazo wrote:
---- Wiadomość Oryginalna ---- Od: zazo <[EMAIL PROTECTED]> Do: jetspeed-dev@jakarta.apache.org Data: Tue, 29 Mar 2005 13:32:16 +0200 Temat: Getting Folder from path
solution?Hi all,
I am writing custom layout for my Jetspeed site. To have it fully work I need one more, little thing -- Is there a way to get Folder object having only path pointing to it?
Ex. Let's say I have String "http://localhost:8080/jetspeed/portal/Public" and by using some tricky API function I can get object of Folder bounded to public folder. Then I can check its name, title etc
Can anyone help me, or at least point where should I look for
I am using J2-M1.
Thank you in advance.
Best wishes.
Tomasz
Yesterday, I found that interface PageManager has getFolders(String) method which according to javadoc 'Locates a folder for the given path.'. Yes!, this is what I am looking for. But...
Can anyone suggest me the easiest way to use it. Should I take a closer look to CastorXmlPageManager which implements PageManager?
I need this functionality to build (full) breadcrumbs for my site, get folders only from root folder, build navigation from files located in some directory and so on...
It's getting urgent :(
Thanks for any tips.
Best regards
Tomasz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]