Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I would like to move from DTGE to Umbraco Grid
But One thing That I loved about DTGE is the ability to use my own class to manage the code outside of the view.
I am looking for a nice way to use it , with :
I will then have to migrate all the data out of DTGE to Umbraco Grid, but that's another story
Has anyone got an idea for custom controller ?
Regards !
Hi wmotr
Firstly, with Dot Net core... it's totally possible to inject your custom services into views...
https://docs.umbraco.com/umbraco-cms/implementation/services#using-the-siteservice-inside-a-view
(I Know MVC is dead etc)
Otherwise, the BlockGrid doesn't have to use the suggested default way of rendering it
@await Html.GetBlockGridHtmlAsync(Model, "myGrid")
It has a strongly typed model called 'BlockGridModel' so you can read it like any other Umbraco property, and manipulate and render how you see fit, perhaps in a ViewComponent, or in a hijacked MVC controller
https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor#2.-build-your-own-rendering
regards
marc
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
BlockGridItem custom Controller
Hi
I would like to move from DTGE to Umbraco Grid
But One thing That I loved about DTGE is the ability to use my own class to manage the code outside of the view.
I am looking for a nice way to use it , with :
I will then have to migrate all the data out of DTGE to Umbraco Grid, but that's another story
Has anyone got an idea for custom controller ?
Regards !
Hi wmotr
Firstly, with Dot Net core... it's totally possible to inject your custom services into views...
https://docs.umbraco.com/umbraco-cms/implementation/services#using-the-siteservice-inside-a-view
(I Know MVC is dead etc)
Otherwise, the BlockGrid doesn't have to use the suggested default way of rendering it
@await Html.GetBlockGridHtmlAsync(Model, "myGrid")
It has a strongly typed model called 'BlockGridModel' so you can read it like any other Umbraco property, and manipulate and render how you see fit, perhaps in a ViewComponent, or in a hijacked MVC controller
https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor#2.-build-your-own-rendering
regards
marc
is working on a reply...