Sitecore Experience Accelerator Hands-On

experience accelerator hands-on Sitecore sxa

The Sitecore Experience Accelerator (SXA) offers a radically different approach of creating Sitecore sites compared to the classical method. A clean Sitecore installation will force to you invest quite a substantial amount of effort before you can actually show anything to the customer, the main reason being that there are no standardized out-of-the-box components available. SXA strives to solve this issue by offering standardized components together with a new design model and an easy-to-use interface.

Installation

The installation of the SXA is pretty straightforward. Note that there is no supported way of removing the SXA once it is installed!

1. Install Sitecore Powershell Extensions (4.0 or higher)
2. Install Sitecore Experience Accellerator (make sure to restart Sitecore Client & Server after installation)
3. Rebuild all search indexes

Let’s get our hands dirty

We will create a reusable page layout to demonstrate some of the SXA mechanisms. Make sure you have a license that includes Sitecore SXA, adding the license later seems not to get reflected in existing tenant sites.

Start by inserting a new tenant in the Content Editor.

create-tenant

Select the features to be available in your site. The less features you have, the simpler the site structure will be.

feature-selection

Sitecore will create a new tenant and some additional items, e.g. a folder for tenant-specific templates. Check the tenant item to see the configured paths.

tenant-structure

In the tenant, insert a new site.

create-site

A wizard will start. Select site name, language and features. You should only change the language if you plan to use a site-per-language approach.

site-creation-wizard-1

Go to the Theme tab and make sure you have selected Wireframe.

site-creation-wizard-2

Hit OK to generate the site (be patient, this may take up to 5 minutes). When the site creation is finished, you can see that there are already some items in your site. These items will be used to configure design, behaviour and content of your components.

site-content

The Home item and its subitems are the page structure of your site. Let us add some fields by going to the template and inserting Title and Content.

add-template-fields

Note that SXA templates do not inherit from the standard template directly, but from SXA-specific templates.

template-inheritance

When you select the home item, you can see our new fields.

home-item-fields

Do not edit the field content yet. Right-click the item and start the Experience Editor. There is a floating toolbox and a new ribbon called Experience Accelerator. Select it to see a (pretty empty) wireframe version of your SXA page.

experience-accelerator-empty-page

We start by creating some partial designs. A partial design is a set of components, tied to a specific placeholder on any page. Typical examples would be a header and a footer, so let us start with those. Select Partial DesignsInsert Partial Design in the ribbon and name it Header.

insert-header-wizard

You can see in the navigation bar that Sitecore now addresses the partial design (If you do not see the navigation bar, activate it under the View ribbon).

Take a moment to examine the toolbox. Depending on your feature selection, there are up to 80 predefined components ready to use, such as tabs, carousels, language selectors, breadcrumbs and much more.

Let’s add a title to the header section. To do that, drag the component Page Content → Header to the header placeholder. Note how Sitecore marks all droppable areas as well as the targeted one.

drop-header-component

The component is now placed on the partial design. Note that we cannot change the text here directly. Sitecore assumes that we want to render the content of the Title field.

Save the partial design.

title-properties

Next, create another partial design named Footer. Drag the component Page Content → Rich Text (Reusable) onto the footer placeholder.

drop-footer-component

We have selected a reusable component, which effectively means we want to share its content everywhere on the site. This is a typical selection for a footer.

Sitecore now asks us to specify the associated content, let us create a new item.

new-rich-text

For rich text fields, you can edit the content directly in the Experience Accelerator. Enter a copyright message.

enter-copyright-message

We are now ready to add a page design with our new partial designs. Select Page Designs → Insert Page Design, select the template Page Design and specify a name.

When you hit OK, you can select the partial designs that are included in our page design. Select Header and Footer.

page-design-wizard

As last step, we have to associate the page design to our item template. This tells SXA to use the the page design for all items of that template. Select Site Page Designs in the ribbon and specify the new page design for the Home template.

site-page-designs

When you hit Save, you will see the page in the specified design, built up from our partial designs.

page-design

You can edit the title field directly in the Experience Editor. Changes you perform on the page level are reflected only in the rendering of that specific item. If you want to change something generic, you have to edit the page design or the partial designs.

edit-title-field

Note that your changes are reflected in the Home item.

home-item-in-content-editor

Summary

We have seen how we can utilize the new concepts and features of the Experience Accelerator to create a simple mocked-up page design without any custom development. The remaining process steps typically include exporting a transferrable version of the site and have it styled by an agency. It can then be reimported into Sitecore to reflect the design throughout the whole site or tenant. In the meantime, content editors could already enter content, without having to care about the final design.

Conclusion: Every light has its shadow

With the SXA, Sitecore introduces an exciting new approach of creating sites. It leverages a mechnism to utilize a wide variety of predefined components instead of having to recreate them for new projects.

This new abstraction layer on top of the Sitecore platform can make site creation less technical and hence reduce business reluctance to go for a Sitecore solution. It aims to facilitate parallelization to reduce time-to-market. It embeds rapid prototyping directly into the platform and can use the resulting information structure productively.

Needless to say that so much functionality does not come without drawbacks. The SXA introduces new concepts and a fair amount of additional complexity. It utilizes a convention-over-configuration approach, which makes it necessary to know these conventions (e.g. that the Title component will look for a Title field on the current item). SXA is a very new product, so there are still some pretty heavy bugs (initial release) and the documentation is not comprehensive. Last but not least the product incurs additional license cost, which will allegedly be considerable.

2 Thoughts to Sitecore Experience Accelerator Hands-On

Comments are closed.

  • Ashish
    Ashish

    While installing SXA 1.2 module for Sitecore 8.2, below issues are getting logged every time. Due to below issues I am getting object reference error when I click sitecore/system/Modules/PowerShell/Script Library/SXA – Compliancy or same level SXA – nodes. I think due to this issue, neither I get Tenant insert option nor I see the feature List with tenant. Can you please help me here.

    ERROR Error installing items/master/sitecore/system/Modules/PowerShell/Script Library/SXA – Compliancy/{FC3E458D-7A79-4995-B052-A394CFEFDA3C}/en/1/xml
    Exception: System.AggregateException
    Message: One or more exceptions occurred while processing the subscribers to the ‘item:saved’ event.
    Source: Sitecore.Kernel
    at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
    at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters)
    at Sitecore.Events.Event.RaiseItemSaved(Object sender, ItemSavedEventArgs args)
    at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
    at Sitecore.Data.Engines.EngineCommand`2.RaiseEvent[TArgs](EventHandler`1 handlers, Func`2 argsCreator)
    at Sitecore.Data.Engines.EngineCommand`2.Execute()
    at Sitecore.Data.Engines.DataEngine.SaveItem(Item item)
    at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item)
    at Sitecore.Data.Managers.DefaultItemManager.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult)
    at Sitecore.Data.Managers.DefaultItemManager.SaveItem(Item item)
    at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent)
    at Sitecore.Data.Items.ItemEditing.EndEdit(Boolean updateStatistics, Boolean silent)
    at Sitecore.Install.Items.ItemInstaller.GetVersionInstallMode(PackageEntry entry, ItemReference reference, XmlVersionParser parser, ItemInstallerContext context, Boolean& removeVersions)
    at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry)

    03.01.2017 12:10
    • Markus Klimmasch
      Markus Klimmasch

      Hi Ashish,

      apparently one of the event handlers of the item:saved event throws an exception for these items. I remember seeing these issues also when installing other modules (and you can find some examples on the web, e.g. this one). Do you have custom event handlers for item:saved in your solution? Some modules add handlers as well, and they might be incompatible with the SXA installation process.

      I suggest the following:

        Open YOURSITE/sitecore/admin/showconfig.aspx
        Locate the event handler configuration for the item:saved event (the path should be sitecore/events/event name=”item:saved”)
        Check if there are “non-native” handlers (e.g. EXM-, WFFM-, or custom handlers); you can compare with a vanilla installation if unsure
        Comment out the non-native handlers and install SXA
        Uncomment the handlers again

      Hope that helps!

      04.01.2017 10:01