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

ken manheimer ken.manheimer at gmail.com
Wed Aug 3 17:51:23 UTC 2011


On Wed, Aug 3, 2011 at 5:58 AM, Raphael Ritz
<r.ritz at biologie.hu-berlin.de>wrote:

> On 8/3/11 12:57 AM, ken manheimer wrote:
>
> [..]
>
>         The catalog does now about order in a folder through the
>>
>>          getObjPositionInParent
>>
>>        index. In case that's not available for sorting in a
>>        collection (I didn't check) you can enable it in
>>
>>        <site>/portal_atct/atct___**manageTopicIndex
>>
>>        Is that what you are looking for?
>>
>>    yes, it looks like exactly what i'm seeking.  (gil forcada's
>>    suggestion about using a custom folder display view is excellent,
>>    too.  maybe i just need to read martin aspelli's book?)  i'm running
>>    into problems getting it working, and have to investigate further.
>>
>> alas, this turns out to be a false lead.  the collections configlet
>> doesn't offer any way to change the selection of criteria for *sort
>> order*.  it only offers ways to change the indexes to be used for
>> collection /searching/ and /field display/.
>>
>
> That's disappointing :-(


truly.  but, happily, you've provided a resolution...


> Which version of Plone?
>

4.0.7 - i should have mentioned that earlier.


> In a somewhat older Plone 3 based site I could enable the
> the index for sorting as described.
>
> Looking into this a bit my guess is that this is due to a
> new index type that was introduced for 'getObjPositionInParent'
> specifically.
>
> In Products/ATContentTypes/**criteria/__init__.py ALL_INDICES and
> SORT_INDICES are hard coded. What happens if you add
> 'GopipIndex' (the new index type) there (to both)?
> If nothing happens there might be some configuration missing still.
>
> Feel free to file a ticket for this. At least I would consider
> this a regression. Oh, and this made me look whether there might
> be one already and sure enough there is
>
> http://dev.plone.org/plone/**ticket/11151<http://dev.plone.org/plone/ticket/11151>
>
> Does the patch provided there work for you?
>

hooray - yes!

i've added a comment in the issue asking for the patch to be included in
plone.  i should have mentioned the regression, and tests to protect against
it happening again...

this is great - thanks much for seeing this through!

ken


> Raphael
>
>
>
>> (moreover, adding getObjPositionInParent/'Order in folder' to the search
>> criteria doesn't actually add an "Order in folder" option in the
>> collection "Add new search criteria" menu!  the getObjPositionInParent
>> has no "Allowed Criteria", so there's nothing by which to qualify and
>> disqualify items in the search.  hence, the option is filtered out in
>> the selection form.  it probably should be filtered out from the "All
>> fields" alternatives in the collection configlet, as well.)
>>
>> still, i appreciate the suggestion - i learned something about ways to
>> adjust collection knobs (and limitations on those ways).  i may be
>> better off with a custom "display" view for a folder - except i have
>> doubts that'll be trivial, because it requires something to hold and
>> edit the rich text i want to include, and that's not part of a folder.
>>  aargh again.
>>
>> it's looking, once again, like the built-in types do not provide for my
>> desired, basic use case, even by tailoring custom views...
>>
>> ken
>>
>>    i did have to enable the getObjPositionInParent field in the
>>    collections configlet (thanks much for the clear path to find my way
>>    there), and that involved using the "All fields" link to expose the
>>    option.
>>
>>    once that's done, though, i still don't see the "Order in folder"
>>    friendly name among the collections sort criteria.  i double checked
>>    everything to see if i got the order wrong, etc, and even changed
>>    one of the working friendly names to verify that the change shows in
>>    the collection sort criteria list, which it did.  will investigate
>>    further soon, but mention it in case i'm (again:-) missing something.
>>
>>    ken
>>
>>        Raphael
>>
>>
>>            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
>>
>>
>>            ______________________________**___________________
>>            Product-Developers mailing list
>>            Product-Developers at lists.__plo**ne.org <http://plone.org>
>>            <mailto:Product-Developers@**lists.plone.org<Product-Developers at lists.plone.org>
>> >
>>
>>            https://lists.plone.org/__**mailman/listinfo/plone-__**
>> product-developers<https://lists.plone.org/__mailman/listinfo/plone-__product-developers>
>>            <https://lists.plone.org/**mailman/listinfo/plone-**
>> product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>> >
>>
>>
>>
>>        ______________________________**___________________
>>        Product-Developers mailing list
>>        Product-Developers at lists.__plo**ne.org <http://plone.org>
>>        <mailto:Product-Developers@**lists.plone.org<Product-Developers at lists.plone.org>
>> >
>>
>>        https://lists.plone.org/__**mailman/listinfo/plone-__**
>> product-developers<https://lists.plone.org/__mailman/listinfo/plone-__product-developers>
>>        <https://lists.plone.org/**mailman/listinfo/plone-**
>> product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>> >
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> Product-Developers mailing list
>> Product-Developers at lists.**plone.org <Product-Developers at lists.plone.org>
>> https://lists.plone.org/**mailman/listinfo/plone-**product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>>
>
>
> ______________________________**_________________
> Product-Developers mailing list
> Product-Developers at lists.**plone.org <Product-Developers at lists.plone.org>
> https://lists.plone.org/**mailman/listinfo/plone-**product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20110803/a14f3b1c/attachment.html>


More information about the Product-Developers mailing list