Hello,
I have upgraded a project running on 4.7.2 to 7.2.8 and made it run.
Because it is such an old project it is still using masterpages and razor macros.
I was hoping to use the grid-layout, but rendering it doesn't seem to work with this setup.
I'm guessing this is because the macros inherit from umbraco.MacroEngines.DynamicNodeContext and not something like UmbracoViewPage.
Is their any way of using the grid-layout with the setup I have or is the answer that it simply isn't supported?
Using grid-layout with razor macro
Hello, I have upgraded a project running on 4.7.2 to 7.2.8 and made it run.
Because it is such an old project it is still using masterpages and razor macros. I was hoping to use the grid-layout, but rendering it doesn't seem to work with this setup. I'm guessing this is because the macros inherit from
umbraco.MacroEngines.DynamicNodeContext
and not something likeUmbracoViewPage
.Is their any way of using the grid-layout with the setup I have or is the answer that it simply isn't supported?
Cheers, Håvard
Hi Håvard.
Great to hear that you was able to upgrade from and old Umbraco 4.7.2 to the latest version.
What you could do is to make a partial view or a partial view macro file, and in there add the Razor code for outputting the content of the grid.
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Grid-Layout/Render-Grid-In-Template
So instead of output in directly into the template you do it though a partial view or partial view macro.
Strongly typed Razor
or the dynamic Razor
Hope this helps,
/Dennis
Hi Dennis!
That did the trick, thank you :)
Cheers,
Håvard
is working on a reply...