Copied to clipboard

Flag this post as spam?

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


  • Matt 353 posts 825 karma points
    Jun 24, 2022 @ 16:54
    Matt
    0

    Get the root of the filtered list.

    Hi all,

    I've got a filters block setup on my website which looks like the following;

                            @if (Model.MoreFilters != null && Model.MoreFilters.Count() > 0)
                            {
                                <div class="select__wrapper filter-categories">
                                    <label class="select__wrapper__title">Filters</label>
                                    <div class="select__wrapper__dropdown">
                                        <div>
                                            @foreach (var item in Model.MoreFilters)
                                            {
                                                <label>
                                                    <input type="checkbox" class="chkFilters" value="@item.Key.ToString("N")">
                                                    <span class="filter__checkbox"></span>
                                                    @item.Name
                                                </label>
                                            }
                                        </div>
                                    </div>
                                </div>
                            }
    

    It allows you to add addition filters, however when they add addition filters I want the label e.g "Filters" to show what the category is of that filter is e.g "Age", How could I achieve this?

    The tree for the filters looks like

    • Filters
      • Age
        • 16
        • 18

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft