Sitecore Blog: Dev Sitecored²

Loaf - A collection of Presentation Layer Examples

By Steve Green, October 15, 2011 | Rating:  | Comments (2)

Breadcrumbs

I was recently on a long intercontinental flight with little to do and thought I was probably long overdue for a blog post. Alex Shyba once said on his blog that if you get asked about something more than twice you should blog about it, with that in mind the question I get a lot is "Can you show me how to just create a Breadcrumb?". So in response here are 6 different examples of Breadcrumbs using our various presentation layer options.


The 6 presentation layer examples are:

  1. Inline Code
  2. Databound Control
  3. Webcontrol
  4. XSLT
  5. Templated Control
  6. Razor for Sitecore


If you'd like to have a look at any in isolation I'd recommend just downloading the package and unzipping it manually. Otherwise follow the instructions below to install all 6 on a blank copy of Sitecore.

Disclaimer: These examples are purely as examples of the many and various ways you can create page controls in Sitecore, they are not in any way intended to be seen as best practices or a comment on which is the "best" system to use. That said I welcome such discussion (inline code! hardcoded GUIDS! Gasp!) in the comments section and in fact look forward to it ;) 

Install instructions:

Step 1) Install MVC http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1491
Step 2) Install blank copy of Sitecore 6.5
Step 3) Switch AppPool to .NET 4.0
Step 4) Install the Razor For Sitecore module: http://trac.sitecore.net/RazorForSitecore
Step 5) Make sure you include the web.config changes for the Razor module
Step 6) Install the Loaf package
Step 7) Add to web.config:
    <pages validateRequest="false">
      <namespaces>
        <add namespace="Loaf.Helpers"/>
      </namespaces>

Comments

  • How do I get access to sitecore 6.5 and some documentation?

    I'm doing some R&D and want to see what is supported in sitecore for asp.net mvc. I've heard there is full support for things like page editor, content editor, template manager, etc but I can't find any documentation to back this up.

    - Craig Sisk
    October 19, 2011 at 8:19 AM

  • Hi Craig, documentation and 6.5 are for download on the Sitecore Developer Network here: http://sdn.sitecore.net/SDN5/Resources/Sitecore%206/Sitecore%20CMS.aspx

    As for MVC, this guide (also on SDN) should be a good first step: http://sdn.sitecore.net/Reference/Sitecore%206/Sitecore%20and%20MVC.aspx

    - Serafina Frongia
    October 19, 2011 at 8:41 AM

*
*
*

Learn More with Sitecore

Newsletter
*

Nymity | Read Case Study >

Sitecore provides such power that we were able to develop and launch under our time and cost budget, resulting in a tool that's a rapidly growing hit with the privacy professional community.

- Terry McQuay, President, Nymity