Hi,
Is it possible to add @Html.Partial("uSkySlider") in to my Umbraco grid.
I tried to create a macro and in my macro i added :
@Html.Partial("uSkySlider")
but When I try to add macro in my grid I get error :
Error loading Partial View script (file:
The Umbraco log file showing following error :
2017-12-20 11:29:54,860 [P1576/D3/T139] WARN umbraco.macro - Error loading Partial View (file: ~/Views/MacroPartials/SlideMacro.cshtml). Exception: Umbraco.Web.Mvc.ModelBindingException: Cannot bind source type Umbraco.Web.Models.PartialViewMacroModel to model type Umbraco.Web.Models.RenderModel.
at Umbraco.Web.Mvc.RenderModelBinder.ThrowModelBindingException(Boolean sourceContent, Boolean modelContent, Type sourceType, Type modelType)
Rendering Slider in Grid
Hi, Is it possible to add @Html.Partial("uSkySlider") in to my Umbraco grid. I tried to create a macro and in my macro i added :
but When I try to add macro in my grid I get error :
The Umbraco log file showing following error :
I am using Umbraco grid. Please help.
Thanks
Hi Fahad,
It's been a while since you posted your question, but I'll post an answer anyway.
Why are you trying to run a partial from inside you macro partial view?
To me the most logical solution would be to move your code from the uSkySlider partial into the Macro Partial View of the macro.
There's a very good guide to how to insert a slider into the grid which might explain stuff that you already know, but still: https://24days.in/umbraco-cms/2014/grid-macros/
And the SimpleSlider mentioned in the article is available here: https://github.com/agiraud/SimpleSliderEditor/tree/master/Src/SimpleSliderEditor.ui/Views/MacroPartials
I hope that this will help you solve the issue.
/Søren
is working on a reply...