Posts

Showing posts with the label SXA

Modernizing Sitecore Pages: Script-Based Removal of Default Components After Page Design Adoption

Hello everyone, In this blog I will share one most important powershell script that I personally extensively used while working on XMC migration project. Our migration project was from XP to XM Cloud which had whole UI redesign but Sitecore CMS structure remain same. Intially, while migration we followed the traditional Sitecore approach to add the renderings to standard value of the template as they were added in legacy. But when most of the component was developed, we though of utilizing the Page Design and Partial Design feature of SXA. The most commong thing which can go to page design and partial design was header, footer, breadcrumb etc which was common for all pages. Now the major problem here was, in legacy, Header and Footer for example was added manually to page level items. So we faced duplication issue as the components are coming from page design as well as standard values. To overcome this issue, the best solution was to remove the components from standard values of te...

Custom Component Rendering in Sitecore SXA

Image
Hello Everyone. In this blog, i am going to explain you that how we can a create custom SXA controller rendering. As we all know SXA provides most of the component OOTB only but still there are time where we need to create our own controller rendering to meet business requirements. As a traditional Sitecore developer, we could have easily create Controller rendering and used it to add in Page but when we are working in SXA, there are some standard rules which we need to follow while developing a Custom SXA Controller rendering. We will understand this with a example. Let's consider, we have requirement to develop a form. The form has two variations which is listed below. Normal Form Form on top of Hero Banner Let's see how we can develop this component First Way : We can use Sitecore Forms for normal form Or we can create Rendering Variant of Page Content. Create Scriban template to create the Hero Banner Component.Then again use Component variant field to add Form Compon...

Custom SXA Search Scope Query Token

Image
Hello everyone, In this blog we will see how we can use a custom token in SXA search scope query. What is custom search scope query token and when it is useful. So let's start with understanding what is SXA search scope query token. We all are aware like how search is an important and integral part of any website built using Sitecore. Specially when we are building a website using SXA then most of the time we use Search Result OOTB SXA component for any kind of listing. The Search Result OOTB component primary requirement is Search Scope query. We can build the scope query from Sitecore only where we can define things like Location, Templates etc. Location: Used to help the Solr to get data from specific folder Templates: Used to filter the Sitecore items created from specific templates Many of the time, this suffice to build your search scope query to get the desired results. But we all know, there are times that we need something different from normal scope query to get our resul...

Extending Sitecore Page Selector Component in SXA

Hello everyone, I am back with another blogpost. This time we will discuss about one of the Sitecore SXA default OOTB component Page Selector and how we can extend it. We all know that implementing pagination is one of the crucial requirement whenever we have some listing implementation on our website. Listing example can be, showing all related search results when someone search for any text on website. In SXA, we all know to implement pagination we can go for SXA OOTB Page Selector component. Page Selector component only needs the search signature and in datasource field we give the default data item for showing the pagination component. This component is binded to your Search Result component using the Search Signature to show the result count according to the pagination parameter to paginate define in the Search Result component. But sometime we have some extra requirement which cannot  be achieved using default component. For ex. Like we need to scroll to top of the search re...