Sitecore

Posting forms in Sitecore controller renderings – another perspective

Martina Welander, Technical Consulting Engineer at Sitecore, recently blogged about posting forms in Sitecore MVC: Part 1 – View Renderings and Part 2 – Controller Renderings. Especially for controller renderings there are multiple ways of doing it. In this blog post I want to explain another way of doing it. This post is based on the comments on her blog and an SDN forum post. Recap In Sitecore MVC the page is rendered by different renderings. This means that on one single page request, there…

Keep reading »

Adding additional information to the Sitecore login page

In a current project we wanted to show the current build number on the login page. This should help the content authors and testers to easily identify which build is currently running and for which build they have to create issues/bugs on our issue tracker. I though this is an easy one and just altered the file with the following content: Today, I’ve learned from Robbert Hock that this isn’t they way of doing this ;-) I heard of the -pipeline. With this, we can easily add additional information…

Keep reading »

Wrapping a view rendering to automatically add additional markup

On a current project we extensively work with components, where each component is represented by a view rendering (the complete solution is based on MVC). We have the requirement that each component can have an additional title block (which needs a lot of html markup). The title block can be enabled on a component with a checkbox field. When we have about 20 components, does it make sense that each developer needs to handle this markup in his view rendering? No way! The developer shouldn’t care…

Keep reading »

Handling 404 and other errors with Sitecore items

Error handling is very important in any type of application. But it’s not only important to handle the error in the backend, it’s also very important to give a properly and easy to read feedback to the user. Sitecore provides a basic set of error pages (page not found (404), access denied (403) and layout not found (500)). But these pages are static and not adapted to the customer layout. The most comfortable way of creating nice error pages is to have an item within Sitecore for each error. The…

Keep reading »

Update your sample items to use ASP.net MVC

After installing Sitecore you get a sample item template with some sample renderings. Unfortunately all the sample layouts and renderings are written in ASP.net WebForms and not in ASP.net MVC. All of our new projects are based on MVC, so I also want to play around with MVC. Because you can’t mix MVC and WebForms components in one single http request I have to change the layouts for every installation, which takes me longer than the installation itself (with the Sitecore Instance Manager, of…

Keep reading »