Copied to clipboard

Flag this post as spam?

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


  • Matt 359 posts 842 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 359 posts 842 karma points
    Aug 16, 2024 @ 07:23
    Matt
    0

    Bumpy :)

  • 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