Copied to clipboard

Flag this post as spam?

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


  • John C Scott 473 posts 1183 karma points
    Mar 17, 2017 @ 10:23
    John C Scott
    0

    Control Ordering of Nested Content Items by Document Type

    So... what I am wondering is... Is there a way to control the order items appear in the nested content. I'd like to be able to group together items of the same document type.

    This is where an example may help: Let's say I have a nested content which can have three types of item added to it, let's call them Mr. Black, Mr. Red & Mr. Pink. I'd like to define the allowed order as Black, Red, Pink.

    My user adds Mr Black.

    The List looks like this:

    1. Mr Black Item 1

    My user then adds Mr Pink, Mr Red, then Mr Black, then Mr Red

    The list now looks like this:

    1. Mr Black Item 1
    2. Mr Black Item 2
    3. Mr Red Item 1
    4. Me Red Item 2
    5. Mr Pink Item 1

    My user then decides to re-order the list, and moves Mr Black item 2 above Mr Black item 1

    The list now looks like this:

    1. Mr Black Item 2
    2. Mr Black Item 1
    3. Mr Red Item 1
    4. Me Red Item 2
    5. Mr Pink Item 1

    Now my user tries to move Mr Black Item 1 to the bottom of the list...

    This would not be allowed...

    Either they would try, and it would snap back to the bottom of the blacks, or the move would grey out after they left the black zone.

    Are there any events available for ordering, or moving, or adding that could achieve this re-order?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Apr 20, 2017 @ 10:27
    Matt Brailsford
    100

    Hey John,

    This isn't something currently possible in NC. To do this, you'd probably have to tweak the JS for the property editor. We might be able to do something with events in angular, and maybe broadcast a sorting/sorted event, but it's not something actively on our list atm.

    Sorry I couldn't give you much of a workaround.

    Matt

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Apr 20, 2017 @ 10:42
    Ravi Motha
    0

    This smaakcs of one of 2 things user education, ie teaching them this is how the display will work (regardless of the order you put items in the back office (you could extend that and use uEditorNotes to help on the display side

    or you have to do what matt said which is tweak a load of js to capture the event, and the specific instance to look through orthe nested content and grouping and display meaningful messages or errors

  • John C Scott 473 posts 1183 karma points
    Apr 20, 2017 @ 11:39
    John C Scott
    0

    I hear you Ravi - but - it's just a bit weird for the editor - the different doctypes will be output in a fixed order. It just would be nice if the ordering could be forced - it's doesn't really matter what order the editor puts them in it would be nice to give them a bit of feedback from the control so it's clear what's going on. It's a design thing to have the many optional elements in a specific order. It doesn't really matter if this isn't possible, it's just making the editor experience a bit nicer. Always trying to do that! :)

  • John C Scott 473 posts 1183 karma points
    Apr 20, 2017 @ 11:51
    John C Scott
    1

    VIA Twitter @HendyRacher has suggested the neatest, simplest, most practical and downright cleverest answer to this problem....

    It's obvious really. That's to have an OnSave event that just reorders them.

    HA problem solved :)

  • Ravi Motha 290 posts 500 karma points MVP 8x c-trib
    Apr 20, 2017 @ 11:57
    Ravi Motha
    0

    Oh right I was thinking more that you were thinking of intercepting the action and stopping them adding the items in the wrong order.. i like Hendy's idea

    Do it afterwards for them, so they see what they will get in terms of grouping..

    I still think you need a note or something in a description that tells the user what will happen.. and I agree making the user /editor experience is a worthwhile goal in the long run

Please Sign in or register to post replies

Write your reply to:

Draft