Copied to clipboard

Flag this post as spam?

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


  • Josip 187 posts 652 karma points c-trib
    Jan 11, 2019 @ 17:18
    Josip
    0

    Ucommerce category navigation

    Hello again, I hope that this time someone will give some answer on my noobish questions :)

    I am playing with ucommerce category navigation and i am having some problems to achieve this enter image description here

    This is live example: https://www.daraz.pk/

    This is how my view looks now:

    @helper DisplayCategories(IList<CategoryViewModel> categories)
    {
        <ul>
            @foreach (var category in categories)
            {
                <li>
                    <a href="@category.Url">
                        <span>@category.Name</span>
                    </a>
                    @DisplayCategories(category.Categories)
                </li>
            }
        </ul>
    }
    @DisplayCategories(Model.Categories)
    

    I have checked fields in table and got idea to add if statment to check if ParentCategorId is not null but i dont have that field in model, and i cant add it there. This is how model looks like: enter image description here

    I have no idea what to do next, i appreciate any help.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies