XF 2.2 Nestable list with sub-lists

Scandal

Well-known member
Hello all! :)
I have a question about the integrated nested-sort function of xF2.
For a basic sort table, we have this:
HTML:
                <div class="nestable-container" data-xf-init="nestable" data-max-depth="1" data-value-target=".js-Messages">
                    <xf:if contentcheck="true">
                    <ol class="nestable-list">
                        <xf:contentcheck>
                        <xf:foreach loop="$Messages" key="$messageId" value="$Message" i="$i">
                            <li class="nestable-item sort-message" data-id="{$messageId}">
                                <div class="nestable-handle nestable-handle--full"><i class="fa fa-bars"></i></div>
                                <div class="nestable-content">
                                    {$Message.title}
                                </div>
                            </li>
                        </xf:foreach>
                        </xf:contentcheck>
                    </ol>
                    </xf:if>
                    <xf:hiddenval name="Messages[]" value="" class="js-Messages" />
                </div>
Let's say that for a $Message, I want to include sub-items.
The important is that I don't want those sub-items to be able to mixed with the main nestable-list and also not with other's sub-items nestable-lists.

Example:
Main1 ($Message)
-- sub1 ($Message.subMessages)
-- sub2 ($Message.subMessages)
-- sub3 ($Message.subMessages)

Main2 ($Message)
-- sub4 ($Message.subMessages)
-- sub5 ($Message.subMessages)


The max-depth is 2. A subX cannot have childs.

The result should be this:
1. I would like to be able to sort between Main1 and Main2.
2. On the same page, I would like to be able to sort sub1/sub2/sub3 (only inside these 3 items block) an sub4/sub5, again only between those two. No mixing between blocks/ tables. See the colors above. No mixing between colors.

Go it? :)
Any idea?
Let's say that the subX items is on $Message.subMessages.
 
Back
Top Bottom