Sitecore SXA module contains templates, Renderings, Layouts, Placeholder Settings, branch etc. It helps structure the SXA site by scaffolding items required to setup the component.
In this blog post I will walkthrough the steps to create a module manually to have a better understanding and helps specially to debug when there are issues with the existing modules.
Create Module(Part 1)
Navigate to – /sitecore/system/Settings/Feature
Right click Featur folder to create module
Create new module overlay will open.
Provide a Module name – i.e. Custom Image Block
Choose the location where this module to be created.
Select the system areas the module folders to be created
Choose the module should be applied to tenant or site
When module is created should be able to see the folder with the Site Setup Root item
Once the Site Setup Root is created you should be able to see folders with name “Custom Image Block” will be created in Branch, Template, Renderings, Placeholder Settings, Layouts and Media Library or the system areas selected.
Create template required for creating Branch
For creating a branch you will need a template and rendering. Create a template in “Custom Image Block” folder. For now you don’t have to add fields. See blog the fields that were created for component.
Create “Image Block Folder” Template
Create rendering required for creating Branch
Create controller rendering with name “Image Block” in – /sitecore/layout/Renderings/Feature/Wits/Custom Image Block.
For now don’t setup anything in rendering. See blog for the configuration required in rendering-
Navigate to /sitecore/templates/Branches/Feature
Create a new branch. Right click on the folder “Custom Image Block” and insert new branch option
Select the template earlier created-
Branch with name “Image Block” will be created.
Delete $name item in the branch
Rename the Image Block to “Available Image Block Renderings”.
After installation Restart the machine, this should enable the Hyper-V feature
This should also have Docker running and should see the same in system tray
Switch to Windows containers
Right click on Docker icon and switch to Windows Container. See this link for more details as per guide
Download and Prepare for installation
Download and extract the Sitecore Container Deployment Package from the Sitecore Developer Portal and store it on your local workstation or check releases here
Copy and extract SitecoreContainerDeployment.10.1.0.005207.309.zip for e.g:- C:/sc101_install
Navigate to C:\sc101_install\compose\ltsc2019\xp0
Open .env file, we need to fill in this parameters before starting installation. You can find more details in guide for each option.
Download PowerShell script to initialize (init.ps1) the parameters from docker-examples. Parameter values in .env can be populated manually by individually executing the commands for required for each parameter in guide(see Appendices) but I would recommend to use init.ps1 as this is provided by Sitecore and hence tried and tested.
Folder structure should look like this-
Change parameter values in init.ps1 file.
Change the SitecoreAdminPassword, SqlSaPassword and host entries as per requirement. If you are changing host entries also ensure the same is updated in .env file for CM_HOST and ID_HOST parameters. Lets keep the default values.
Populate .env file using init command
Open PowerShell as a Administrator, navigate to the folder having init.ps1 file.
Execute init.ps1 script. You may have to set the execution rights to current user to execute the script-