Archive for August, 2011

Sitecore in two minutes

The Sitecore content tree represents a database. Everything in the tree is an item and the data model for each item is called a template.

ASP.NET code is used to create layouts and sublayouts. A layout is an aspx file that behaves like an ASP.NET masterpage. Typical layouts are One Column Layout, Two Column Layout and Print Layout which equate to a header and footer with a content area, header and footer with a content area and side bar, and a cut down print layout.

Sublayouts are the smaller coded components that make up a page. Examples include the main navigation menu, recent news items, sidebar tag cloud etc. These components could be modular and able to be moved or they can be fixed within the location of layouts.

You write ASP.NET code to make controls and to access data to populate the templates on each item. If your page has a title tag, your code would access the field “Title Tag” from the template (template is the data model for the item).

There are two ways to code. One uses the Sitecore Developer Center that lets you create layouts and sublayouts – this is like using Visual Studio in Design Mode. The other way uses Visual Studio to build the layouts/sublayouts and point to them in the section of the Sitecore tree called Layouts. Each layout and sublayout item has a path that maps to either an aspx or ascx file respectively. The layout and sublayout items are then used via the Presentation > Details tabs for each item in Sitecore.

You can also use XSLT files to generate HTML from database items however you are not afforded the luxury of debugging. XLST files are called Renderings by Sitecore and are also referenced in the Layout section of the Sitecore tree.

Categories: Sitecore