Copied to clipboard

Flag this post as spam?

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


  • Christina 111 posts 344 karma points notactivated
    Jun 18, 2018 @ 13:36
    Christina
    0

    Select sibling from currentpage in a View

    Hi In a View I want to select sibling children and render on currentpage

    When Im using var cPage = Umbraco.Content(1127); I t works but I want to use documenttype instead how can I do that

     @foreach (var item in cPage.children())
                {
                    <li>
                        <a href="@item.Url">@item.Name</a>
                    </li>
                }
    

    Many Thanks Christina

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jun 18, 2018 @ 14:14
    Tim Geyssens
    100

    So something like @Model.Content.Parent.Children().Where(x=> x.Id != Model.Content.Id)

  • Christina 111 posts 344 karma points notactivated
    Jun 21, 2018 @ 11:23
    Christina
    0

    Hi Tim

    Many thanks /Christina

  • 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