Copied to clipboard

Flag this post as spam?

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


  • Christina 127 posts 390 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

  • Comment author was deleted

    Jun 18, 2018 @ 14:14

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

  • Christina 127 posts 390 karma points notactivated
    Jun 21, 2018 @ 11:23
    Christina
    0

    Hi Tim

    Many thanks /Christina

Please Sign in or register to post replies

Write your reply to:

Draft