Sitecore SXA Practical – Implementing an Sitecore SXA website

High Score Labs News   •   Jun 29, 2022

Introduction: We have already discussed about the “Analyze” stage in previous article. We have derived basic structure of our website. In this article we are going to create entire SXA website from scratch and discuss about various elements to implement it

Input from “Analyze“phase:

  • In Analysis phase – we have understood and followed process of analyze and implement structure of pages by using Page Design and Partial design concepts with Homepage and Blog / News page examples. Based on requirement of other pages (e.g. Homepage, products, services) should be broken down further so that it can be reusable across the pages.                                 

Definitions:

Tenant: Tenant context is most basic which holds all the configurations and settings of one or more websites and it can be useful to create multi-site shared search. SXA supports multitenancy, which means that you can run multiple sites on a single instance of Sitecore. Each tenant can include multiple related sites, for example, to support multiple brands for a single company or multiple languages or locations for a single brand. Organizations can support multiple languages through one-to-one translated versions (native Sitecore language support) or use a model with a separate site for each supported language.

Site: is logical separation / folder structure under the Tenant context. It has all the pages, media folders, templates etc. The tenant is a top-level container for the sites underneath. Sites in the same tenant are related, for example, because they share the same set of templates or part of the media library. Sites are the items that represent the website and consist of pages, data, designs, and partial layouts.

  • We need to create few websites in various websites and create entire structure within the site context.
  • On creation of any Tenant context – Sitecore PowerShell Extension runs a PowerShell script to install various modules

Process to create Tenant:

E.g. We have create Tenant name as “SXA Demo”

  • Modules listed you can uncheck unwanted modules and it can be configured later.
  • To create a tenant:
  1. In the Content Editor, right-click the Contentitem in the content tree, click InsertTenant.
  2. In the wizard, enter a name for the tenant, select the modules, and click OK.

For more complex solutions, you can use groups of tenants. For example, a multinational selling consumer goods could have the following tenant folders and tenants:

Company (Tenant Folder)

  • Cosmetics (Tenant Folder)
    • Brand A (Tenant)
    • Brand B (Tenant)
  • Laundry detergents (Tenant Folder)
    • Brand A (Tenant)
    • Brand B (Tenant)
    • Brand C (Tenant)
  • Hair care (Tenant Folder)
    • Brand A (Tenant)
    • Brand B (Tenant)
    • Brand C (Tenant)
    • Brand D (Tenant)

To create a group of tenants:

  1. Right-click the content item in the content tree, click Tenant Folder, enter a name and click OK.

Process to create Site:

To create a site:

  1. In the Content Editor, right-click the tenant to which you want to add the site, click Insertand click Site.
  2. In the wizard, on the General tab, enter the name for the site.
  3. On the Modules tab, select the modules and click OK.
  4. On the Theme tab, either create a new theme by selecting Create new theme or select one or more existing theme(s) and click Ok.
  5. On the Grid tab, select the grid and click OK. Your new site is ready immediately.
  6. The SXA Site Manager dialog box displays a list of all SXA sites on your Sitecore instance. The icons  indicate whether the site can be accessed or whether there is a conflict . If there are site conflicts that you need to solve, you can:
  7. Correct the site definition – click the site and on the ribbon, click Open. In the Basic section, change the site name, environment, virtual folder, or the host name.

In our case – we will be preparing Tenant Folders for various region e.g., APAC, EU. Under the relevant tenants, we will be creating country-wise Tenants and under that the website will be created.  So, the structure will be like:

Content > “EU” > France or Germany > France Website

Contact us today!