Copied to clipboard

Flag this post as spam?

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


  • Eudes 8 posts 79 karma points
    Aug 13, 2018 @ 15:22
    Eudes
    0

    Navigation

    Hi, I'm trying to understand how to put links behind each element to filter when we click. here is the native code. I hope you already know this code.

    @inherits UmbracoTemplatePage

    <div class="container">
    
        <!-- todo: implement category selector -->
    
            <nav class="nav-bar nav-bar--center nav-bar--air-bottom">
                <a class="nav-link nav-link--black nav-link--active" href="">All</a>
                <a class="nav-link nav-link--black" href="">Clothing</a>
                <a class="nav-link nav-link--black" href="">Instruments</a>
                <a class="nav-link nav-link--black" href="">Accessories</a>
                <a class="nav-link nav-link--black" href="">Other</a>
            </nav>
    
        <div class="product-grid">
            @if (Model.Content.FeaturedProducts != null)
            {
                foreach (Product product in Model.Content.FeaturedProducts)
                {
                    <a href="@product.Url" class="product-grid__item" style="background-image: url('@product.Photos.FirstOrDefault().Url')">
                        <div class="product-grid__item__overlay">
                            <div class="product-grid__item__name">@product.ProductName</div>
                            <div class="product-grid__item__price">@Model.Content.DefaultCurrency @product.Price.ToString("F")</div>
                        </div>
                    </a>
                }
            }
        </div>
    </div>
    

Please Sign in or register to post replies

Write your reply to:

Draft