Copied to clipboard

Flag this post as spam?

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


  • Josip Pavlović 23 posts 133 karma points
    5 days ago
    Josip Pavlović
    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.

Please Sign in or register to post replies

Write your reply to:

Draft