Copied to clipboard

Flag this post as spam?

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


  • Benjamin Stengaard 27 posts 141 karma points
    Aug 12, 2019 @ 09:18
    Benjamin Stengaard
    0

    Fallback: Fallback.ToAncestors get that ancestors id

    Hey Our

    Is there any way to get the id of the returned ancestors nodes value when using fallback: Fallback.ToAncestors with hasValue ?

    https://our.umbraco.com/Documentation/Reference/Querying/IPublishedContent/Properties/#hasvaluestring-propertyalias

    In the end i want to use it like this: If fallback is tiggered for use on 'title' then also get 'subtitle' from that fallback ancestor node

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Aug 12, 2019 @ 11:21
    Shaishav Karnani from digitallymedia.com
    100

    Hi,

    It seems better to stick with old process here... foreach(var item in Model.Ancestors().OrderBy(x => x.Level)) { if (item.HasValue("property")) { @item.Title @item.SubTitle } }

  • 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