[Product-Developers] showing the folder order in a collection?

ken manheimer ken.manheimer at gmail.com
Tue Aug 2 23:16:10 UTC 2011


[i forgot to cc the group on my initial response to gil, and then had a
brainstorm about a small change to collections that would provide a good
solution to my problem, which i'm including in this resend.]

thanks, gil, for the suggestion.  the problem i see is that i want to have a
rich text description included before the listing of the items, and folders
aren't structured to hold such a rich-text description.  it's very good to
know that i could fairly easily hook up a custom presentation (view) of the
items in a folder, though.

in lieue of a general solution i'm using a collection, and setting the short
names of the folder contents so that i can use the collection's short name
sorting to order them how i please.  it really sucks that i have to go in
and rename the objects if i want to change the sorting - particularly when
folders have that beautiful drag-and-drop ordering mechanism, but
collections just can't be made to obey it...

it occurs to me that a great solution for the collection-based approach
would be to have the "No sort order" respect the sorting order of the items
in their respective folders.  when combining items from different folders,
they could be grouped by folder.  more of a "Sorted by folder" sorting,
which i think would be generally useful, including solving my use case.

ken


On Tue, Aug 2, 2011 at 4:01 AM, Gil Forcada <gil at usecm.com> wrote:

>
>
> 2011/8/2 ken manheimer <ken.manheimer at gmail.com>
>
>> i've wanted for a long time to be able to show the contents of a folder,
>> ordered as they would be in the folder, along with some text describing each
>> item, plus some rich text above describing the folder, as a whole.  there is
>> a number of combinations of various facilities that come close to providing
>> this simple arrangement, but fail in tantalizing ways.  have i missed
>> something?
>>
>> the obvious answer is to use a collection with "No sort order" for the
>> sorting criterion.  unfortunately, "No sort order" doesn't wind up being the
>> same sort order as that of the items in the folder, except sometimes, by
>> accident.  (of course - the collection doesn't consults the catalog, not the
>> folder, for the contents.)  that's a showstopper for me - what i really want
>> is to be able to adjust the ordering of the items in the folder in order to
>> adjust their ordering in the collection.
>>
>> the other tantalizingly close option is to just use a folder, with an
>> (optionally, customized) summary, standard, or table view, and use the
>> folder Description text as the introductory text.  alas, the folder
>> Description is plain, not rich text.
>>
>> well, how about using a collage, with a folder inside it?  aargh, that's a
>> mess - navigation portlets don't track the contents properly, etc.
>>
>> i know i should just create a derivative folder content type that has an
>> additional, rich-text area before the listing (and after, if i really want).
>>  unfortunately, i've given up on finding the time to do that, so i'm asking
>> if anyone has faced the same need, and found a solution?
>>
>> ken
>>
>>
> Hi,
>
> To me this is just a custom view of a folder (even selectable via the a
> Display menu) and the key is the method listFolderContents on the context
> object.
>
> Just add something like this on you pt:
>
> <tal:content repeat="item context/listFolderContents">
>     <h1 tal:content="item/Title">
> Element title</h1>
>     <p tal:content="item/Description">Element description</p>
>     <div tal:content="structure item/Body">Element body</div>
> </tal:content>
>
>
> Cheers,
>
>
>
> --
>
> *Gil Forcada**
> *C/Llacuna, 166 2n.2a (Edifici Llacuna)
> telf: 93.188.88.12 - 619.65.34.92
> fax: 93.320.93.97
> (08018) BARCELONA
> gil at usecm.com
> www.usecm.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20110802/68f45bf5/attachment.html>


More information about the Product-Developers mailing list