Copied to clipboard

Flag this post as spam?

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


  • Cary 21 posts 107 karma points
    Jan 08, 2021 @ 09:48
    Cary
    0

    Inherit Fallback With Grid

    Hi all,

    I'm using Grid to render my content, and there was a useful feature Inherit with ancestors, just code like this :

    @Model.Value("inheritTitle", fallback: Fallback.ToAncestors)
    

    but when I try to use this feature with Grid, I have no idea, render my Grid like this:

    @Html.GetGridHtml(Model, "grid")
    

    How do I use this feature with Grid, anyone has idea?

    regards

    Cary

  • AddWeb Solution Pvt. Ltd 109 posts 360 karma points
    Jan 08, 2021 @ 13:10
    AddWeb Solution Pvt. Ltd
    0

    Hello,

    @using MyCode.Umbraco.Web.Extensions;
    @inherits UmbracoViewPage<ContentPage>
    @{
    Layout = "BasePage.cshtml";
    }
    <div>
    @Html.GetFallbackGridHtml(Model, ContentPage.GetModelPropertyType(c => c.Body).Alias, "site")
    </div>
    
  • Cary 21 posts 107 karma points
    Jan 11, 2021 @ 00:38
    Cary
    0

    Hi,

    thanks for your reply, but I need more information,

    1. where I can find MyCode.Umbraco.Web.Extensions;, I tried Umbraco.Web.Extensions,But It's failed.

    2. I can't get a function like GetFallbackGridHtml

    would you please give more Information about the above two things?

    regards

    Cary

  • Cary 21 posts 107 karma points
    Jan 11, 2021 @ 00:39
  • Cary 21 posts 107 karma points
    Jan 11, 2021 @ 01:49
    Cary
    0

    Another Info

    I want use this function in partial view, how to?

Please Sign in or register to post replies

Write your reply to:

Draft