• ONEcard
  • Bear Tracks
  • Apps@UAlberta
  • Webmail
  • eClass
  • Libraries
SEARCH

University of Alberta

  • Prospective Students
  • Current Students
  • Faculty & Staff
  • Alumni & Friends

CUSTOMIZING THE LAYOUT

Feature Area

The feature space can be user for large, featured content. It can contain:

  • Text
  • Images
  • Video

Toggle Background Grid On or Off

Creating your own layouts

Creating custom layout elements within the sitecore templates is done using a combination of the grid CSS, HTML and jQuery.

By default, the columns in Sitecore are set using the .griditem class and a set width. In order to customize within any of these columns, you need to turn off the .griditem class and use the .griditemouter class so that you can place .griditem elements within the column.

Without this change, .griditems will not fit in the container OR content will stretch outside of the 960px width.

Changing the Column to an outer width

Use jQuery to change the dimensions on the Column where you will build a custom layout. For this example. we need to change column 1:

$(document).ready(function() {
	$("#Column1").attr("class","griditemouter");
});

This code is added to the Javascript section of the page in Sitecore as follows:

jQuery 1

With the DOM loaded, the #Column1 section now has no margins or padding applied. To see how this changes the alignment to the grid, toggle the background grid on/off.

Fix/unfix this section by applying the proper classes class="griditem w24"

Use the developer tools

When experimenting, use the developer tools in Safari or Chrome to see changes take place with jQuery or to see how changes are implemented.

screenshot

It is also helpful to diagnose any layout problems that may be caused by improper sizing of elements.

elements