0
votes

I am trying to create filter menus that list the input values of template variables (t-v) from all children within a parent. I use EVO.

Here the setup:

  • Parent (1)
    • child (a)
    • t-v-1 (input value: car)
    • child (b)
    • t-v-1 (input value: house)
    • child (c)
    • t-v-1 (input value: boat)

The filter menu on front-end should show then:

  • "Filter menu: t-v-1"
  • O car
  • O house
  • O boat

So basically the filter menu code should pull all input values from the template variables (across all parent children) into the filter-menu-box (possibly eliminating duplicate input values).

This is my basic filter-menu chunk.

<div class="btn-toolbar">
        <!--Default buttons with dropdown menu-->
        <div class="btn-group">
            <button class="btn btn-default" type="button">T-V-1</button>
            <button class="btn btn-default dropdown-toggle" data-toggle=
            "dropdown" type="button"><span class="caret"></span></button>
            <div class="dropdown-menu scrollable-menu" style="margin-left: 2em">
                <input type="text" class="form-control" placeholder="Search values">
                <div class="checkbox">
                    <label><input type="checkbox" value=""> Value-1</label>
                </div>
                <div class="checkbox">
                    <label><input type="checkbox" value=""> Value-2
                    </label>
                </div>
                <div class="checkbox">
                    <label><input type="checkbox" value=""> Value-3</label>
                </div>
            </div>
        </div>

The values 1,2,3 should then list the input values from the t-v across all parent children.

Is it possible to achieve my objective in MODx EVO?

1

1 Answers

0
votes

You could try the xdbfilter package for this. It is quite old but there is not much Evolution development these days. I think the linked package is the latest one.