[Zope-CMF] path to a folder

Fearless Froggie fearless_froggie@yahoo.com
Wed, 12 Mar 2003 10:53:47 -0800 (PST)


Hi!

Just when I think I've got it all figured out ... some
more weirdness comes along ... ack! If anybody has any
ideas or tricks, I'd much appreciate it:

I have a hierarchy of folders (of a custom type) in my
portal. And I have a python script that I feed a
folder name to, and it gives me back a list of
subfolders in that folder, and their url. It kinda
almost works, but boy the urls the script generates
are hideous.

For example, if I feed it the name of the portal, I
should be getting the urls of the folders in that
portal. Instead of getting what I want:

"http://www.mydomain.com/portal/destination_folder"

it's giving me:

"http://www.mydomain.com/portal/portal_skins/custom/portal/destination_folder"

Of course, as the user clicks around on these links,
they just keep getting longer and uglier.

Here is the script (as you can probably tell from the
hideous url above, I have the scripts in the skins
directory):

menu = '' 
parent_object = getattr(context, parent_cat)
for menu_item in
parent_object.contentValues(my_folder_type):

   menu = menu + menu_level1_item.absolute_url() +
'<br>\n'
return menu

It just gives me a listing of URLs to each item in the
folder 'parent_cat'. 

If anybody has any ideas, relevant tutorials, or
sample code they can refer me to, I'd much appreciate
it!

Thanks, Rita.


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com