Sitecore MVC -- View Renderings, @Html.Sitecore(), and Custom Models (Part 2)
Why Stack Overflow recommends it
Stack Overflow users link it when answering Sitecore MVC questions about renderings, rendering the media or field values in views, and using custom models with Sitecore data.
Recommended by 3 people across 3 different months, 2014 to 2016.
What it is
A 54-minute tutorial, part 2 of a Sitecore MVC series from the Sitecore CEP channel. It covers View Renderings and the RenderingModel object, using datasources and rendering parameters, the @Html.Sitecore() helper and its .Field() method, building a custom helper, and returning your own model classes from View and Controller renderings.
What people said
Recommends Sean Holmesby · 2014-04 · Stack Overflow · on “What's the difference between Renderings and Sublayouts in Sitecore”
The difference between Renderings and Sublayouts are simply the file types that they each represent. In WebForms, (which was the only option in Sitecore before 6.6) these are pretty much tied to the following:- Renderings - XSLT Sublayouts - Web Controls (.ascx files) For MVC (Sitecore 6.6 and up), you have the Renderings for your different MVC types. The most commonly used ones are:- Controller Rendering View Rendering If you're only using MVC components, then these are the ones you'd use, as Sublayouts are more for WebForms .ascx controls. For help with these types, I'd recommend watching Martina Welander's SitecoreMVC tutorials:- [LINK] [this video]
Recommends Harsh Baid · 2014-07 · Stack Overflow · on “Get media url in View in Sitecore MVC”
You need to parse the Raw value of Media or Field using HtmlString before using it in Rendering when using with FieldRenderer . Though if you can provide more code then it can be answered more accurately because in Sitecore there are many ways (Sitecore ORMs and/or APIs) using which you can render Item Fields. Also refer this Sitecore MVC project [LINK] on GitHub and below listed Sitecore MVC videos on YouTube it can prove helpful in long run. Sitecore MVC - Getting Started (Part 1) [LINK] Sitecore MVC -- View Renderings, @Html.Sitecore(), and Custom Models (Part 2) [this video] And there few blog articles [LINK] by Martina they are good resource on Sitecore MVC parts. I hope that will be helpful
Recommends Mark · 2015-02 · Stack Overflow · on “Sitecore Basics”
I know this question is a little old, and already answered, but I think I have some info to add. I've a number of ASP.net web application. If I convert the project to Sitecore project will it just work magically? Nothing is magic. If you want the content management or marketing aspects of Sitecore, plan on rebuilding your site(s) within Sitecore. If I want to create new site do I need to manually create a new site in IIS or Sitecore does it when I publish? Sitecore is an IIS site. When you install Sitecore, it creates an IIS site along with at least 3 databases (core, master, & web). Sitecore can have multiple subsites, but they're all built within the single IIS site that is Sitecore. Are t
Cites AfshinZavvar · 2016-11 · Stack Overflow · on “using Sitecore fileds in MVC models”
I watched some videos about implementing IRenderingModel interface and inherit renderingModel class in order to use Sitecore data template fields in MVC models (like [this video] ) but as far as I understood, in MVC side, all properties are declared as HtmlString; hence I'm looking for an effective way to use Sitecore fields in MVC model Below are defined data templates: News Title Text Description RichText Image Image Category MultiList Category Title Text ID Int