Sitecore MVC - Getting Started (Part 1)

Sitecore CEP · 200K views · 2013 · 32:09

Open on YouTube

Web developmentSoftware architecture & designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the standard starting point for developers new to Sitecore MVC, both in answers to beginner questions and as the tutorial they learned from.

Recommended by 6 people across 7 different months, 2013 to 2016.

What it is

A 32-minute tutorial by Martina Welander on the Sitecore CEP channel introducing Sitecore MVC. It compares standard ASP.NET MVC with Sitecore's implementation, shows how to enable Sitecore MVC, and walks through View and Controller renderings.

What people said

Recommends jammykam · 2013-12 · Stack Overflow · on “Sitecore 7 and MVC 4 integration”

Your starting point is going to be the Sitecore MVC Developers reference [LINK] and there was a great video tutorial posted which is a step by step: Sitecore MVC - Getting Started (Part 1) [this video] . You may also want to read: John West's Sitecore MVC blog posts [LINK] , these are mainly related to Sitecore 6.6 but a lot of the theory is still the same. Learning Sitecore MVC [LINK] Getting started with Sitecore MVC as asp.net mvc developer [LINK] There are plenty of other posts, you need to Google these, don't expect a comprehensive list to be posted on SO. If you are not familiar with MVC then you need to read, learn and understand the techniques. It's not greatly different from ASP.Net but

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:- [this video] [LINK]

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) [this video] Sitecore MVC -- View Renderings, @Html.Sitecore(), and Custom Models (Part 2) [LINK] And there few blog articles [LINK] by Martina they are good resource on Sitecore MVC parts. I hope that will be helpful

Recommends Zooking · 2014-11 · Stack Overflow · on “Can we create a View with model in sitecore without creating a Controller?”

If you want to do this the "plain" Sitecore way. Just right-click the item "Sitecore/layout/renderings" and insert an item of type "View Rendering". Add the path of your view in the "path"-field. This video is a very good introduction to Sitecore MVC [this video] This is also a very good source for learning about Sitecore MVC: [LINK]

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

Recommends jammykam · 2016-02 · Stack Overflow · on “How do i create a rich text editor component in sitecore”

Suggest you head over to Sitecore Community Forums [LINK] for tutorial style help, people will be more than happy to help. Worth watching this set of [this video] and reading through the Community Docs [LINK]

Recommends Ben Golden · 2016-10 · Stack Overflow · on “Set background image of div in xslt file from sitecore image item”

I don't know of any that explicitly use MVC and EXM together, but this is where I started learning about Sitecore MVC: [this video]

Cites Tim Griffiths · 2014-03 · Stack Overflow · on “What is the best way to set up your development environment for Sitecore”

The general guidance appears to be to install Sitecore into one folder, e.g. D:\Websites\MyWebSite and then create your Visual Studio project in a separate folder, e.g. C:\Projects\MyWebProject. You would then publish your custom code into the Sitecore folder from Visual Studio (This video explains what I’m describing [this video] around 13 mins in). I have the following questions:- Do people only store their Visual Studio project in source countrol and not the Sitecore code? The publish option from VS into the Sitecore folder only has options for adding files or deleting anything not in the VS project. How would files removed from the VS project ever get deleted without doing it manually? We use

Cites Tim Griffiths · 2014-04 · Stack Overflow · on “Sitecore: Add to here button not showing on placeholder”

I've been working through Martina Welander's SitecoreMVC tutorials ( [this video] ) and run into an issue when I try to add new placeholders. When my placeholder is called "content" the Page Editor shows a nice clickable block with the Add to here heading. But if I change the name to anything else the block disappears. At first I thought it might be because I hadn't set up any placeholder settings for that key, but even after doing that the Page Editor doesn't show the placeholder zone. Clearly there's a basic step I'm missing somewhere to add the key to a list or something?

Cites user3767164 · 2014-09 · Stack Overflow · on “The controller for path '/' was not found or does not implement IController in Sitecore”

I am learning Controller rendering in Sitecore from Here [this video] . I created One simple controller(HelloWorld) and Related View(Index.schtml) . Mapped it(with Name PageContent) in rendering section of Sitecore Explorer... and Add Rendering Item in Home Item in Content Section of Sitecore Explorer.. But When I Browse it, it gives the Error . The controller for path '/' was not found or does not implement IController. All the post I have Read are related to Asp .Net MVC ..but I have issue related to Sitecore MVC Sample.html (Page Content in Sitecore Explorer Rendering Section) @using Sitecore.Mvc <html> <body> @Html.Sitecore().Placeholder("content") <p>Today's date is @DateTime.Now.ToShortDate