Friday, 29 November 2024

My Sitecore Contribution 2024

November 29, 2024 0


As we approach the end of 2024, it’s time for Sitecore’s MVP nomination season, marking the opportunity to aim for the prestigious Sitecore 2025 MVP title. In this blog post, I’d like to reflect on my contributions and achievements within the Sitecore community since November 2024.

Let’s take a closer look at my Sitecore contributions for 2024:

Sitecore blogs:


Founder of Sitecore User Group (SUG) Kolkata

This year, I had the privilege of founding SUG Kolkata, a dedicated platform to bring together the Sitecore community in a spirit of collaboration and knowledge sharing. Our goal is to create opportunities for learning, networking, and exploring various aspects of the Sitecore platform. Through presentations and discussions, we aim to connect Sitecore enthusiasts and professionals alike.

I am immensely grateful to L&G Consultancy for sponsoring SUG Kolkata and to Rohan Kenkre for his invaluable advice. I would also like to extend my heartfelt thanks to Arjun Arora (Organizer), Biswajit Nayak (Member), and Chandan Kumar (Member) for their unwavering support in making this initiative a success.

This year, I organized 13 webinars and co-hosted 5 additional webinars. For more information, please visit the SUG Kolkata Event Page.

Additionally, you can find recordings of all our events on the SUG Kolkata YouTube Channel.

I have organized the following webinars through SUGKolkata:

Sitecore Speaking Events

I had the opportunity to present informative sessions at various Sitecore user groups, where I covered key topics such as XM Cloud Components, XM Cloud Component Builder . These sessions were designed to provide valuable insights and practical guidance for those navigating the platform.




SUG Kolkata YouTube Channel Engagement

Channel Link: https://www.youtube.com/@SUGKolkata
Videos Uploaded – 17
Views – 750+



Sitecore bugs and Feature requests:

This year I’ve logged and raised the following bugs requests on the support portal:

CS0464897 Restful JSS API Service For Form
CS0464506 Issue with React Native JSS Application
CS0458320 Dictionary keys are getting displayed instead of value. This is formally submitted to the Sitecore Bug Tracking System. 
CS0415370 Error: Cannot create tracker - Reopened

Product Review

I contributed to the Sitecore community by reviewing and sharing my feedback on the Sitecore Digital Experience Platform on G2. My comments aimed to provide valuable insights for others evaluating the platform.


Sharing Posts on Social Media About Sitecore

I actively engage with the Sitecore community across platforms like Twitter, LinkedIn, and the Sitecore Community Slack channel, where I share suggestions and solutions based on my knowledge and experience.

I also participate in various Sitecore events, promoting them on social media to increase awareness and keep the community informed about Sitecore-related announcements.

With a network of 1.6K followers on LinkedIn, my Sitecore-related posts generate an average of 3.5K–4K impressions per month, reflecting my commitment to contributing and connecting with the wider Sitecore community.





Active Participation on Slack

I have been an active member of the Sitecore Community Slack channel, consistently engaging in discussions and contributing to the community.

As part of my efforts, I share blogs on the Slack Blogfeed channel, provide updates about relevant webinars, and actively contribute valuable insights to promote knowledge sharing and collaboration within the community.

SUGCON 2024

I had the amazing opportunity to attend SUGCON 2024 in Bangalore, India! 🌟 It was an incredible experience connecting with fellow Sitecore enthusiasts, exchanging ideas, and diving deep into Sitecore's latest innovations.

A special highlight was engaging with the amazing Sitecore team, including Tamas Varga, Rob Earlam, Pieter Brinkman, Andy Cohen, and Liz Nelson—thank you for sharing your insights and making this event even more memorable!

Here are some snapshots from this incredible event. 📸


Achievements of 2024 

This year, I earned my certification in Sitecore XM Cloud, further strengthening my expertise in Sitecore’s cutting-edge cloud-native technologies. This milestone enhances my ability to deliver personalized and impactful digital experiences for clients.

Grateful for the journey of learning and growth this year has brought! Excited to continue contributing to the Sitecore community and exploring new opportunities.


Sitecore MVP Mentorship Program

This year, I had the privilege of joining the Sitecore MVP Mentorship Program as a mentee. Through this program, I gained invaluable technical knowledge, deepened my understanding of Sitecore technologies, and connected with outstanding professionals within the Sitecore community.

I am especially grateful to my mentor, Rohan Kenkre, for his invaluable guidance and support throughout this enriching journey. His mentorship played a pivotal role in shaping my learning experience.

Objectives for 2025

In 2025, my focus is on expanding my expertise in Sitecore CDP Personalize and Sitecore Order Cloud, enabling me to deliver more robust and innovative solutions. A key priority will be advancing work on XM Cloud accelerators to streamline and expedite client transitions to the XM Cloud platform.

Aligned with my passion for knowledge sharing, I aim to create valuable resources to assist community members on similar journeys. This includes contributing to discussions, sharing insights, and actively participating in Sitecore User Group (SUG) events.

Additionally, I aspire to go beyond being a speaker by taking on the responsibility of organizing SUG Kolkata webinars. This initiative reflects my commitment to fostering community engagement and providing a platform for Sitecore enthusiasts to connect and exchange knowledge.

In summary, my objectives for 2025 center on:

  • Exploring Sitecore's composable digital experience strategy.
  • Advancing XM Cloud accelerators.
  • Sharing knowledge through blogs, webinars, and community events.
  • Actively participating in Sitecore events.
  • Organizing SUG Kolkata to strengthen community collaboration.

These goals reflect my dedication to driving innovation and contributing meaningfully to the Sitecore community.

Some useful PowerShell scripts for a Sitecore developer

November 29, 2024 0



Recently, I had the opportunity to work on a data migration project in Sitecore 10, where we migrated data from a custom application into Sitecore. For this project, I utilized the Sitecore PowerShell module, which, combined with some effective PowerShell scripts, enabled a seamless data migration process.

In addition to the migration, there were other requirements, such as removing unused media files, cleaning up user accounts, and managing content. I researched solutions for these tasks and found several useful scripts from various sources. To help the community, I’ve consolidated these scripts and shared them on GitHub for reference. I hope they prove helpful to fellow Sitecore developers.

As Sitecore instances grow larger, maintaining them becomes increasingly challenging, highlighting the importance of scripting tools to perform bulk operations on Sitecore items efficiently. Below is a collection of scripts designed for bulk activities and data migration from other databases.


Collection of Useful Sitecore PowerShell Scripts

Below is a curated list of Sitecore PowerShell Extension (SPE) scripts designed to assist with common tasks like bulk actions, content management, and data migration. Each script includes a GitHub link for reference.

1. Change the Template of All Child Items

This script allows you to update the template reference for all child items under a specific parent item.

GitHub Link: Change the Template of All Child Items

2. Export Child Items of a Specific Template

Use this script to view and export child items that belong to a specific template or category.

GitHub Link: Export Child Items of a Particular Template

3. List Recently Updated Children of an Item

Find and list all child items of a specific item that have been updated within the last few days.

GitHub Link: List Recently Updated Child Items

4. Remove Unused Media Items

This script identifies and deletes unused media items in your Sitecore database, helping you clean up the media library effectively.

GitHub Link: Remove Unused Media Items

5. Remove Workflows

Check or remove workflows assigned to items. This script is particularly useful during data migration projects.

GitHub Link: Remove Workflows

6. Unlock All Locked Items

Automatically unlock items left locked by content authors, saving time for administrators who would otherwise have to unlock them manually.

GitHub Link: Unlock All Locked Items

7. Create Items from a CSV

Migrate content into Sitecore CMS by creating items under a specific parent item using data from a CSV file.

GitHub Link: Create Items from CSV

8. Unlock a User

Enable a user’s access to the Sitecore CMS using this script.

GitHub Link: Unlock a User

9. List Unpublished Items                                                                                                    

Generate a list of items that have either never been published or were unpublished in the web database.

GitHub Link: List Unpublished Items

These scripts can significantly simplify day-to-day Sitecore tasks and maintenance efforts. Feel free to explore and customize them as per your project requirements!

I’ll continue to add more scripts to this post over time. Feel free to bookmark this page for future reference and check back as needed!

                    Sitecore PowerShell Extensions Example Scripts

Wednesday, 20 November 2024

Create your first SXA Custom Components in Sitecore XM Cloud Using Next.Js

November 20, 2024 0


XM Cloud comes preloaded with basic components for text, images, page content, and more. In my previous blogs, I covered how to create and manage components in XM Cloud using the Component Builder. In this post, I’ll provide a step-by-step guide to building custom components in Next.js within the XM Cloud environment.

Why Custom Components Matter

Developing custom components is a standard approach to creating unique elements that enhance your pages' design, functionality, and user experience.

Step 1: Creating a New Headless Module

To create a custom component in Sitecore XM Cloud, you first need to set up a Headless Module. Here's how:

  1. Navigate to Settings -> Project -> [Site Name] in XM Cloud.
  2. Right-click your project, select Insert, and then click Headless Module.

  3. In the popup window, choose a name for the module (e.g., Custom Component) and assign it to a folder. For this tutorial, we created a "Tutorial Site" folder under Feature to store our custom modules like Basic Content.




Step 2: Cloning a Rendering

After creating the module, clone an existing out-of-the-box (OOTB) Headless rendering to save time. For this example, we’ll clone the Promo component.

  1. Right-click the rendering, navigate to Scripts, and select Clone Rendering.



  2. In the popup, provide a name for the new rendering (e.g., Article) and link it to the module created earlier.



  3. Ensure the Parameters and Data Source tabs have Copy Original Rendering Parameters selected.




Next, locate the template under Templates/Feature/Tutorial Site/Custom Component. Update the Article template to include fields specific to your new component.


Step 3: Importing the Component Module to the Site

Once the template is ready, the module can be added to your site:

  1. Use the Scripts -> Add Site Module command.


  2. In the popup, select your new module for installation.



  3. A corresponding Data folder will be created for storing content items.




Add the component to Presentation -> Available Renderings to make it accessible for drag-and-drop functionality on pages.


Finally, open the page editor, locate your component, and place it on the desired page. Ensure all related items are published in XM Cloud to avoid visibility issues.

Step 4: Creating SXA Components in Code

TypeScript View File

The TypeScript file for your component must match the Component Name field on the rendering item in XM Cloud. Use the withDatasourceCheck higher-order component to fetch and render data from the Sitecore Content API. Key libraries include @sitecore-jss/sitecore-jss-nextjs for managing field types like Field, ImageField, Text, and Link.

  1. Create the view file in the src/components/rendering folder.

  2. Scaffold the component using the JSS command:


    jss scaffold "Article"
  3. Alternatively, create the component manually. Ensure the fields are editable in Experience Editor and render correctly in preview mode.



    import React from 'react';

    import { ComponentParams, ComponentRendering } from '@sitecore-jss/sitecore-jss-nextjs';

    import { 

      Image as JssImage, 

      Link as JssLink, 

      RichText as JssRichText, 

      ImageField, 

      Field, 

      LinkField, 

      Text 

    } from '@sitecore-jss/sitecore-jss-nextjs';


    interface Fields {

      Title: Field<string>;

      Summary: Field<string>;

      Description: Field<string>;

      Photo: ImageField;

      ArticleLink: LinkField;

    };


    interface ArticleProps {

      rendering: ComponentRendering & { params: ComponentParams };

      params: ComponentParams;

      fields: Fields;

    }


    const ArticleComponent = (props: ArticleProps): JSX.Element => (

      <div className={`component article-component ${props.params.styles}`}>

        <div className="component-content">

          <span className="is-empty-hint">Please assign a datasource item to edit the content.</span>

        </div>

      </div>

    );


    export const Default = (props: ArticleProps): React.JSX.Element => {

      const id = props.params.RenderingIdentifier;

      if (props.fields) {

        return (

          <div className={`component my-component ${props.params.styles}`} id={id ? id : undefined}>

            <JssImage field={props.fields.Photo} />

            <div>

              <h2>

                <Text field={props.fields.Title} />

              </h2>

              <JssRichText field={props.fields.Description} />

              <JssLink field={props.fields.ArticleLink} />

            </div>

          </div>

        );

      }


      return <ArticleComponent {...props} />;

    };

Step 5: Testing and Launching the Component

Fetch data via the Layout Service or GraphQL API, using the ComponentRendering object from the JSS SDK to map XM Cloud fields to the component structure.

Run the following command to test your component in connected mode:

npm run start:connected

This launches the app locally at http://localhost:3000, allowing you to preview and refine your component.


Conclusion

Building custom components in Sitecore XM Cloud with Next.js is a streamlined process. By following these steps—creating modules, cloning renderings, scaffolding, and testing—you can develop engaging, dynamic components tailored to your project. Dive in and elevate your XM Cloud applications with polished, user-focused designs!

Monday, 4 November 2024

What’s New in Sitecore XM Cloud

November 04, 2024 0

 


In the September 2024 release for XM Cloud, Sitecore introduced a range of exciting features designed to simplify website management, making it easier for teams to collaborate within a single, centralized application. This update includes enhanced tools for managing site collections, creating new websites, setting site configurations, handling languages, editing hosts, and other features tailored for large-scale, multi-site environments. Let’s take a closer look at each feature.

Site Collections - Simplified Creation and Management

One of the key updates in the September release is the enhanced ability to create and manage Site Collections. Site collections provide a structured way to organize sites, allowing content and templates to be shared seamlessly across sites within a collection. With XM Cloud Sites, you can now create new site collections by providing a Display Name and a System or Item Name, ensuring stable, technical references.


Site Collections help group sites in a way that makes them more accessible, supporting focused content work tailored to specific marketing objectives. This streamlined approach is achieved using the existing Security model, enabling targeted collaboration for marketers.

Site Creation with Templates

Creating new sites within XM Cloud has become even more user-friendly. Users can now select a Site Template that best suits their needs, with each template offering detailed information to ensure a clear understanding of the setup before launching the site.


In addition to basic information like site name and language, users can now choose which site collection to install the site into or create a new site collection and name it during setup.


Enhanced Site Search

For those managing multiple sites in a large-scale environment, the new search feature makes it easy to locate specific websites by filtering through site collections. Filters can be reset at any time to view the full list of sites.

Manage Site Settings

Users can now easily access and configure site settings, including name, system name, and description. New site thumbnails can be uploaded, or existing ones regenerated.

The “Share” option enables users to share content and configurations across sites within a site collection, making it easier to manage centralized content like global campaigns. Presentation-related elements such as page and partial designs, Available Renderings, Styles, and Rendering Variants are also shareable, facilitating centralized site administration.


Under “Site hosts,” users can configure multiple host settings, including host, default languages, and editing host preferences.


On the “Analytics and personalization” tab, site identifiers for use in CDP and Personalize can be managed.

To support multiple languages, users can configure all required languages under the “Languages” tab, allowing content creation in the desired language directly within XM Cloud Pages.


New XM Cloud Navigation Menus

XM Cloud now features an updated, simplified interface to improve access to tools and navigation between projects and environments.

The XM Cloud homepage includes a new navigation header, providing quick access to all XM Cloud tools. Users can open Pages by clicking on a site thumbnail or using the Page Builder button in the navigation header. From Pages, the new Pocket navigation menu offers rapid access to other tools. The Forms and Components builders are accessible via the Design Library menu, while the Media Library, Content Editor, and Explorer can be found under the Content menu. Additional tools are available in the left-hand Settings pane or through the Sitecore Desktop.


Organization Navigation on XM Cloud

The homepage Switcher allows users to easily switch between projects, environments, and organizations. It also provides a quick link to the Sitecore Cloud portal.


Integrated Documentation and Support Tickets

To enhance user experience, the September release introduces integrated Documentation and Support Tickets. A help feature, accessible by clicking the question mark icon, provides direct access to documentation and the ability to raise support tickets with ease.


For more detailed information, please refer to the following resources:

You can also watch a video from Sebastian Winter at Discover Sitecore, which provides a visual walkthrough of the latest features.

Happy Sitecoring!