Since there is a grid that allows us to load macro's inside the sections i have this question. We use Partials Views for every different part on a webpage, for example: Gallery is a partial view, employees is a partial view etc.
But... Is there a way to load them into a macro so that it works and we can use them with the Grid?
If I understand your question correctly, you are now using Partial views that you have created under the partial views folder in the settings section right?
You can load a patial view in a macro by make a partial view macro. Go to the developer section and create a file in partial view macro files folder. You can use the same code from your patial views in the settings section. The different is that you can pass a parameter with the patial view macro, and it inherits from this
Load Partial View in a Marco
Hi,
Since there is a grid that allows us to load macro's inside the sections i have this question. We use Partials Views for every different part on a webpage, for example: Gallery is a partial view, employees is a partial view etc.
But... Is there a way to load them into a macro so that it works and we can use them with the Grid?
Kind regards, Robert
Hi Robert,
If I understand your question correctly, you are now using Partial views that you have created under the partial views folder in the settings section right?
You can load a patial view in a macro by make a partial view macro. Go to the developer section and create a file in partial view macro files folder. You can use the same code from your patial views in the settings section. The different is that you can pass a parameter with the patial view macro, and it inherits from this
Instead of
Documentation can you find here: https://our.umbraco.org/documentation/Reference/Templating/Macros/Partial-View-Macros/ and https://our.umbraco.org/documentation/Reference/Templating/Mvc/views
Hope this helps,
/Dennis
OMG it works! :)
This opens a whole new world! Thanks!
is working on a reply...