Folder

7 Messages Forum Options Options
Embed this topic
Permalink
Chauvet Etienne | ARTIFICA
Folder
Reply Threaded MoreMore options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
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.
Chauvet Etienne | ARTIFICA
Re: Folder
Reply Threaded MoreMore options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Sprry for respost this message, but does anyone knows how to do this ?
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.
Andreas Jung
Re: Folder
Reply Threaded MoreMore options
Print post
Permalink


--On 18. Januar 2006 09:48:49 +0100 Chauvet Etienne | ARTIFICA
<etienne@...> wrote:

> Sprry for respost this message, but does anyone knows how to do this ?
>   How know if a page is in a folder or not ?
>

obj/isPrincipiaFolderish -> 1=Folder, 0 otherwise.

-aj

attachment0 (193 bytes) Download Attachment
Chauvet Etienne | ARTIFICA
Re: Folder
Reply Threaded MoreMore options
Print post
Permalink

>Sprry for respost this message, but does anyone knows how to do this ?
>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.

Thanks for the response, but i don't understand how to use
isPrincipiaFolderish in this case.

http://mywebsite.com/r1/Rub1/sousrub1/page1

When i'm on page1, i'de lke to list all the objects contains in Rub1



-------------------------------------------------------
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
Andreas Jung
Re: Folder
Reply Threaded MoreMore options
Print post
Permalink


--On 18. Januar 2006 10:11:41 +0100 Chauvet Etienne | ARTIFICA
<etienne@...> wrote:

>
>> Sprry for respost this message, but does anyone knows how to do this ?
>> 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.
>
> Thanks for the response, but i don't understand how to use
> isPrincipiaFolderish in this case.
>
> http://mywebsite.com/r1/Rub1/sousrub1/page1
Sorry, but are you sure about you want to accomplish? When you have
reference to an object in ZPT - let's say 'myobject' - then you can check
in
ZPT using the path expression myobject/isPrincipiaFolderish if this object
is a folder or not. That's basic ZPT syntax.

-aj

attachment0 (193 bytes) Download Attachment
Chauvet Etienne | ARTIFICA
Re: Folder
Reply Threaded MoreMore options
Print post
Permalink

i don't succeed to do what i want.

But i do otherwise.


Id do
return [brain for brain in brains if brain.path == '/r1/Rub1/']

Is there a solution to do something like '/r1/Rub1/*' ?


-------------------------------------------------------
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
Martin Aspeli-2
Re: Folder
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by Chauvet Etienne | ARTIFICA
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