Support for MVC Partial Views with RenderTemplateFile
Hi guys,
I've been doing an Umbraco 7 installation of TeaCommerce and I decided to implement some of the shiny AJAX form posting stuff.
One of the things I want to do is refresh my minicart, which has product information and little images and stuff in it and is in the header of every page. I thought that RenderTemplateFile in the JS API would be ideal for this purpose, however, it seems that the only files it can render are macroScripts, not MVC style Partials in my Views folder.
Is there any way to make RenderTemplateFile accept an MVC partial view? Any help would be greatly appreciated!
You are totally right - that feature is missing at the moment. It is on our todo list for features.Until it is added the only thing you can do is to use the cartUpdate event and update your mini cart UI using jQuery.
Support for MVC Partial Views with RenderTemplateFile
Hi guys,
I've been doing an Umbraco 7 installation of TeaCommerce and I decided to implement some of the shiny AJAX form posting stuff.
One of the things I want to do is refresh my minicart, which has product information and little images and stuff in it and is in the header of every page. I thought that RenderTemplateFile in the JS API would be ideal for this purpose, however, it seems that the only files it can render are macroScripts, not MVC style Partials in my Views folder.
Is there any way to make RenderTemplateFile accept an MVC partial view? Any help would be greatly appreciated!
Hi Adam
You are totally right - that feature is missing at the moment. It is on our todo list for features.Until it is added the only thing you can do is to use the cartUpdate event and update your mini cart UI using jQuery.
Kind regards
Anders
is working on a reply...