In the previous blog, Part 1: Sitecore Quick Guide for the Beginner, we covered essential Sitecore topics, including what Sitecore is, its key features, SXA, templates and their types, Standard Values, Helix and Habitat, and how Sitecore interacts with its SQL database. We also introduced important tools like the Content Editor and explained how Sitecore handles content management and delivery.
In this blog, we’ll continue exploring more important topics to help you gain a deeper understanding of how Sitecore works. Let’s dive into the next set of Sitecore concepts…
1. What is CMS (Content Management System) in Sitecore?
Sitecore CMS (Content Management System) is a platform that helps you create, publish, and manage content on your website. It makes it easy to create and update digital content, improving the experience for your users. A CMS is a tool that allows teams to work together to create, edit, and publish digital content like web pages and blogs.
2. What is Versioning in Sitecore?
In Sitecore, versioning lets you create multiple versions of any item, including different languages or variations. Using the Content Editor or Experience Editor, you can create as many versions as needed. There are two types of versions:
- Numbered versions: These are versions of the item in the same language. For example, you might create a special version of your product page for a promotion, including a new image, and then switch it back after the promotion ends.
- Language versions: These are versions of the item in different languages. For example, you can add an English version of a page and also create a French version. You would also need to create separate versions of any images to show in both languages.
3. Rendering in Sitecore.
In Sitecore, renderings are used to display content on a page or part of a page. Some types of renderings in Sitecore include:
- View Rendering: This is used for components that don’t need much logic or database interaction. It’s best for displaying content that doesn’t require complex business or presentation logic.
- Controller Rendering: This rendering involves providing a model, controller, and view. It’s used for displaying content that needs more complex business logic or presentation logic and relies on external data.
4. What is meant by the media library in Sitecore?
The Media Library in Sitecore is the place where you can store and organize all your media items, such as images, videos, audio files, and documents. You can upload and organize files like images (jpg, gif, png), documents (PDF, DOC, PPT), and media files, which can later be accessed and used in the Content Editor.
All your media files are kept in one place and can be organized in folders, similar to how content is arranged in the content tree. You can easily find media items using Sitecore’s search or by navigating through the folders in the Media Library.
5. What are tokens? And what types of tokens does Sitecore support?
As Sitecore developers, it’s a best practice to define Standard Values when creating templates. This allows you to set default or sample values for fields.
To achieve this, we can leverage Sitecore Tokens, which enable dynamic value insertion into fields based on the specific item being created by the content author.
Sitecore provides several built-in tokens that can be used dynamically, including:
- $name: The name of the newly created item.
- $id: The ID of the new item.
- $parentid: The ID of the parent item.
- $parentname: The name of the parent item.
- $date: The current date in yyyyMMdd format.
- $time: The current time in HHmmss format.
- $now: The current date and time in yyyyMMddTHHmmss format.
Example:
Here’s an example using the $name token. In this case, we have a field called “Heading.” When a new item is created, the value of this field will automatically be set to the name of the item being created.
6. What are the different publishing modes in Sitecore?
There are three types of publishing modes in Sitecore:
- Incremental Publish: This mode only publishes the items that are in the publishing queue at the moment. This method is quicker because Sitecore doesn’t have to check or compare different versions of items before publishing them.
- Smart Publish: This mode publishes only the items that have been modified since the previous publish. It compares the items in the master database with their versions in the target database, and if any changes are found, those items are published. However, this can be slow because it compares all items, which can take time if there are many items.
- Republish: This republishes everything, even items that haven’t changed. It replaces every item in the target database with the one from the master database and deletes old versions from the target database. This is useful for updating the website with new content, restoring backups, or adding new languages or targets to the site.
7. Partial designs and Page designs
Partial designs: To reuse similar layouts for sections like the header, footer, and main content of a webpage, you can create partial designs in the page builder. These partial designs consist of components, which can later be combined to form full page designs.
Navigate to the path “/sitecore/content/{Your-Tenant}/{Your-Site}/Presentation/Partial Designs” in the Content Editor. Right click and select “Insert” to add a “Partial Design” for the Header.
Access the newly created “Partial Design” for the Header in the Experience Editor.
Page designs: A page design is a combination of layout elements that help you to organize your pages. For example, you can ensure that the header and footer always appear in the same place. You can also create different page designs for specific types of pages, like a blog page, landing page, or product page. Content authors can then add content to these pre-made layouts.
You can create page designs using both the Content Editor and the Experience Editor.
In the Content Editor, go to the path /sitecore/content/{Your-Tenant}/{Your-Site}/Presentation/Page Design. Right-click and choose “Insert” to add a new “Page Design”.
In the Design section, choose the partial designs you wish to add like header, footer or meta data, click the right arrow to transfer them to the selected items list, and then save your changes.
In the Designing section, there is a field called “Template to Design Mapping.” This field links page designs to templates. By default, pages are created under “Home” using the Page template. Since we want a consistent design throughout the website, we will map the design accordingly. I associated the Article page design with both the Home and Page templates.
Now, when you browse the website, you will see your page content along with the content from the partial designs.
8. What is Scriban in SXA?
I’ll provide a quick overview of Scriban, but I strongly recommend reading this great guide by Drew Taylor for more information.
Scriban is used in rendering variants to define your own HTML layout and control how the data from your template is applied.
Scriban have their own language and rules for getting data from the source and combining it with logic, HTML, CSS, and JavaScript in a single file.
9. What is Cloning in SXA?
In SXA, you can quickly duplicate a rendering using the clone script. This creates an exact copy of the rendering definition, parameters template, data source templates, and branches. You can then change the name and modify the style. This is helpful, for example, when you need several Promo renderings with different styles.
I strongly suggest that you please check out Ankit Tawale Blog for a better understanding of cloning in SXA.
10. What does a pipeline mean in Sitecore?
In Sitecore, pipelines consist of a sequence of steps or processes that are executed in a defined order to achieve a specific task. They are a core component of Sitecore’s architecture. In Sitecore, various processes, including authentication, request handling, publishing, and indexing, are managed through pipelines. Developers can modify these pipelines by altering patch files to add, remove, or change functionality within Sitecore.
To explore and study all the available pipelines in Sitecore, the best approach is to visit the following page:
https://<domain>/sitecore/admin/showconfig.aspx
In the example above, we have a pipeline consisting of three processors. If we need to enhance the functionality, we can insert a new step into the pipeline.
We can also completely replace an existing step, providing greater flexibility to customize the functionality and execution of that step as needed.
In this post, we’ve covered essential Sitecore concepts that will help you create, manage, and optimize your digital experiences. By understanding tools like versioning, rendering, and pipelines, along with features such as media management and SXA, you’re equipped to leverage Sitecore’s full potential. Keep exploring and experimenting to unlock even more possibilities with Sitecore!
Source: Read MoreÂ