Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Trumf 78 posts 160 karma points
    Apr 26, 2017 @ 10:03
    Rasmus Trumf
    0

    Compositions properties sort order

    Hi

    I have two compositions compo1 and compo2. both with a tab called "content". Each have several properties. compo1 has sortorder 1 and compo2 has sortorder 2. I have a document type that inherits both compositions and I can only see one tab as expected. However all properties are mixed up.

    Is it possible to have properties from compo1 listed first and so forth, so properties sort order follow their parent/tabs sort order?

    Thanks in advance

    Rasmus

  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Apr 26, 2017 @ 21:56
    Paul Seal
    0

    Try -1 for compo1 and 0 for compo2

  • Rasmus Trumf 78 posts 160 karma points
    Apr 27, 2017 @ 06:47
    Rasmus Trumf
    0

    Sorting works fine for the tabs. Problem/bug is when tabs have the same name and properties are shared i one tab. The properties are not sorted in any way. Lets say that compo1 have property1, property2, property3 in at tab called "Content" and Combo2 have property4, property5, property6 in a tab also called "Content" On my document type DTXXX i have inherited compo1 and compo2 I will have one tab called "Content" but the properties are listed: property1 property4 property2 property5 property3 property6

    I would like to have them listed for combo1 first and then combo2 property1 property2 property3 property4 property5 property6

    Does that make sense?

  • Rasmus Trumf 78 posts 160 karma points
    Apr 27, 2017 @ 12:05
    Rasmus Trumf
    0

    A fix could be:
    in file: Umbraco\Views\components\umb-groups-builder.html line 110 change:

    <li ng-class="{'umb-group-builder__property-sortable': sortingMode && !property.inherited}" ng-repeat="property in tab.properties">
    

    to:

    <li ng-class="{'umb-group-builder__property-sortable': sortingMode && !property.inherited}" ng-repeat="property in tab.properties | orderBy:'-contentTypeName'">
    

    Of course it would be better if the model had "contentSortOrder" instead of "contentTypeName" to order by.

    And similar changes in file: Umbraco\Views\content\edit.html

  • Rasmus Trumf 78 posts 160 karma points
    Apr 28, 2017 @ 07:29
    Rasmus Trumf
    0

    created an issue with the above solution here: issues.umbraco.org

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 28, 2017 @ 07:46
    Dave Woestenborghs
    0

    Hi Rasmus,

    As a work around Marc Goodson provided some suggestions in this topic :

    https://our.umbraco.org/forum/using-umbraco-and-getting-started/84657-order-properties-from-multiple-compositions

    Dave

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Apr 28, 2017 @ 08:01
    Marc Goodson
    0

    There is an ongoing issue regarding this too here:

    http://issues.umbraco.org/issue/U4-6738

    with another 'partial fix' :-)

  • Rasmus Trumf 78 posts 160 karma points
    Apr 28, 2017 @ 08:27
    Rasmus Trumf
    0

    Thanks Dave, Marc that is a nice solution. Any idea when this will be released in a official release? or is this some of thoose that Niels i talking about that takes major changes in the core?

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Apr 28, 2017 @ 10:02
    Marc Goodson
    0

    I think it's something that needs a bit of a chat with the core team, it's a common recurring problem people hit, and so it should have some discussion eg whether to put a strip of plaster over the problem to help people now, or whether to think why are they hitting that problem in the first place :-)

    The core team are locked down into delivering 7.6, Forms and Deploy, so won't get much headspace until post codegarden I suspect.

    Fingers crossed

Please Sign in or register to post replies

Write your reply to:

Draft