Hi,
> Sprry for respost this message, but does anyone knows how to
> do this ?
Please don't repost *one day* after the first post.
> How know if a page is in a folder or not ?
>
> For example :
>
> Rub 1/sousrub1/page1
>
> In my page1, i want to list all the object contains in
> Rub1.
Sorry, Rub?
If you want to find the parent of the current object, you'd do
context.aq_inner.aq_parent or context.getParentNode() (generally equivalent -
this is python syntax, by the way).
To get all contents directly under that, you could do
context.getParentNode().getFolderContents(), which returns the catalog brains
for all objects directly inside the parent folder.
To get the parent of a parent, you'd do context.getParentNode().getParentNode().
If course, that's assuming page1 is an object. If you're trying to make an
alternative folder listing for a folder, you'd just to
context.getFolderContents(), much like Plone's folder_contents.pt does. Note
that you can even register this with the "display" menu and have it as an option
on a standard folder, by goin to portal_types in the ZMI, finding folder, and
adding your new page template to the list of available view methods at the
bottom of the first tab.
Does that help?
Martin
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users