Copied to clipboard

Flag this post as spam?

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


  • Matt 358 posts 841 karma points
    Aug 12, 2024 @ 11:16
    Matt
    0

    True or false in selection statement

    Hi all,

    After some help if possible.

    Lets say I have the following statement

    @{
        var selection = Umbraco.ContentAtRoot().FirstOrDefault()
        .Children()
        .Where(x => x.IsVisible());
    }
    
        @foreach (var item in selection)
        {
                <a href="@item.Url()">@item.Name()</a>  
        }
    

    On my doc type I have a toggle called "Feature" how could I adjust my selection to only show content where "Feature" is true?

    Thanks

  • Matt 358 posts 841 karma points
    Aug 16, 2024 @ 07:23
    Matt
    0

    Bumpy :)

Please Sign in or register to post replies

Write your reply to:

Draft