Hello, I'm now to Umbraco and want to create reusable content like in a sidebar. I have read the document "Creating reusable content" and that works super!
Now I want to translate the XSLT script to a Razor script. Have anyone done this already? Otherwise I'm gone give it a try.
Like suggested you can use partial views for this, but sometimes Html.Action is better to use because you can first do some logic in the controller before returning the view.
Creating reusable content with Razor
Hello, I'm now to Umbraco and want to create reusable content like in a sidebar. I have read the document "Creating reusable content" and that works super!
Now I want to translate the XSLT script to a Razor script. Have anyone done this already? Otherwise I'm gone give it a try.
Hi, did you find something?
If yes, can you explain me? :)
Hi what you need is partial views.
Have a look at: http://umbraco.com/follow-us/blog-archive/2012/10/30/getting-started-with-mvc-in-umbraco-410.aspx
http://mvc4beginner.com/Tutorial/MVC-Partial-Views.html
Charlie :)
Hello,
Like suggested you can use partial views for this, but sometimes Html.Action is better to use because you can first do some logic in the controller before returning the view.
Jeroen
is working on a reply...