Professional Documents
Culture Documents
Current version: 9.3
The Content Editor is an editing tool that you can use to manage and edit all the
content on your website. It is designed for more experienced content authors who
are familiar with Sitecore and the functionality that it contains.
The Content Editors appearance and functionality vary depending on the user’s
roles, the local security settings, and the customizations that have been implemented
on the Sitecore installation.
The Content Editor’s user interface consists of three main areas that you can
customize to fit your individual needs when you work in the Content Editor. The three
areas are:
The Experience Editor is the simplest of the editing tools that Sitecore provides. The
Experience Editor is a WYSIWYG editor that allows you to easily make changes to
items directly on the page. You can edit all the items that are visible on the page —
text, graphics, logos, links, and so on.
In the Experience Editor, you can edit the fields of the current item and the fields of
any items rendered on the page. For instance, if the menu on the page consists of
titles of the product items, you can edit the titles without navigating to the product
items themselves.
https://doc.sitecore.com/users/81/sitecore-experience-platform/en/the-experience-editor.html
Core – contains all settings, like a large configuration file for the Sitecore user
interface. You can use this if you are customizing Sitecore, for example, by adding
new applications to the Sitecore desktop.
The core database contains all Sitecore settings. It contains definitions for the
Sitecore user interface (Content Editor, Page Editor, etc.). This is where you
can add context menu option to the Content Editor or a new ribbon button to
the Page Editor.
2) It contains the ASP.NET membership tables that drive authentication and
security.
Master – contains all versions of all content. This is where business users
author and edit content.
Web – contains the latest version of published content that has reached a
final workflow state.
An item always has a name, an ID that uniquely identifies the item, and it is based on
a template that defines which fields the item contains. In addition, an item can have
multiple versions and multiple language versions.
https://doc.sitecore.com/users/90/sitecore-experience-platform/en/creating-and-editing-
items.html
Templates
Data Templates:
Data template defines the data and all the information that you want to display on a page like text, image etc.
Data template is schema for sitecore content. Any content item in a Sitecore database is based on a data
template. It can contain fields and can be instanced by editors using insert page. Data templates can inherit from
other data templates and can be assigned Presentation Details and insert options.
Branch Template:
A branch template consists of a branch template definition item, which can contain a single item, a hierarchy of
items, or multiple hierarchies of items. It allows you to define the content structure and entire branch of templates
so by creating an instance of a branch template the whole item structure appears without the user having to
create them one by one.
Command templates
It basically only deals with a command, which is evoked when creating an instance
template. It is used for the automatic creation of items with business logic.
https://www.ictpvtltd.com/uncategorized/types-of-templates-in-sitecore/
https://www.valtech.com/insights/understanding-templates-in-sitecore/
https://helix.sitecore.net/principles/templates/template-types.html
Publishing
Current version: 9.0
When you edit or create new items in Sitecore, they must be published before they
appear on your website. This lets you save unfinished items and decide exactly
when the items are launched to the website.
When you work in Sitecore, the items you save are saved to the Master database.
When you publish new items or updated items, the items are copied from the Master
database to a publishing target, and from the publishing target, the website is
launched. The default publishing target in Sitecore is the Web database.
https://doc.sitecore.com/users/90/sitecore-experience-platform/en/publishing.html
Types of Publishing
In the Publish site wizard, specify the publishing mode for the website you are
publishing:
Incremental Publish – publishes only items that are in the publishing queue.
Every time you change an item, the item is automatically added to the publishing
queue. If the changed item is part of a workflow, the item is added to the publishing
queue when it reaches the final workflow state.
Incremental Publish is the fastest way of publishing because Sitecore does not use
resources to compare versions of the items that are in the publishing queue before
publishing them.
Note
Incremental Publish is only available when you publish the entire website.
Smart Publish – publishes all items that have changed since the last
publication. When you run a Smart publish, every item in the Master database is
compared with the equivalent item in the target database and, if an item has
changed, it is published
Comparing all items in the database makes this a time-consuming way of publishing
your entire website, particularly if the content tree contains many items.
Republish – publishes everything. Republish overwrites every item in the
target database with the equivalent item from the Master database, even if it has not
changed. In this way, republishing removes all obsolete versions from the target
database. You can use republishing to bring a new web database online, to restore a
backup of the master database, and to add a new content language, a new
publishing target, or other system items to the website.
https://doc.sitecore.com/users/93/sitecore-experience-platform/en/publish-a-website.html
Versioning
Current version: 9.2
In the Content Editor or the Experience Editor, you can add new versions of any item
in Sitecore, and you can add as many versions as you like.
Whenever user sends any request to Sitecore through a URL, Sitecore resolves that item by
generating visual representation of that item. Layout provide the basic structure of this visual
representation. Layout is container which contains different component of the page.
Layouts are the scaffolding for your web pages, and will usually include the <head> and
<body> tags for the markup. They often pull in styling and javascript code but have little
markup themselves, instead having multiple placeholders in which one can plug component
renderings.
https://www.techguilds.com/blog/2016/07/layouts-sublayouts-and-placeholders
https://sitecore.stackexchange.com/questions/1872/what-is-the-difference-between-a-layout-
sublayout-and-rendering
MVC and renderings
Current version: 9.0
Sitecore MVC uses a different set of controls than ASP.NET WebForms, and it
therefore does not support all Sitecore renderings.
These two supported types of rendering are the most commonly used:
View Rendering
This rendering type is a Razor view. Sitecore provides a default controller and model
for the view. You can customize the model by changing the mvc.getModel pipeline.
Use this when you want to render item content that does not require any significant
business or presentation logic.
Controller Rendering
For this rendering type, you supply controller, model and view. You specify in the
rendering definition item what action Sitecore takes to render the component.
Use this to render content that relies on external data and/or requires significant
business or presentation logic.
This rendering is used occasionally:
Item Rendering
This rendering type requests that content (an item) renders itself. The content has
information about how it renders.
The following renderings are supported for legacy reasons:
Method Rendering
This rendering type outputs the return value of a call to a static method.
XSLT Rendering
Use this to render Sitecore XSLT on a Sitecore MVC page. This rendering type is
similar to the View Rendering type, but using XSLT as the template engine instead of
Razor.
Use this if you have a library of existing Sitecore XSLT components that you do not
want to rewrite.
Url Rendering
This rendering type renders the response of a HTTP GET request onto the current
page.
You can use it if you need to screen scrape HTML from another system. Can
sometimes be used to avoid using iframes.
https://doc.sitecore.com/developers/90/sitecore-experience-manager/en/mvc-and-renderings.html
Droplist: A Droplist stores the name of the items. It allows the editors to
select one value from the dropdown list. Droplist is similar to Droplink, the
only difference is – Droplist stores item name while the Droplink stores the
ID of the item
https://sitecoretricks.com/tag/droplist/
DropTree:
https://sitecoretricks.com/tag/droptree/
Pipeline
A pipeline is a series of actions that execute in sequence to perform a task in Sitecore. Each
processor in a pipeline contains a method named Process() that accepts a single argument and
returns void. Pipelines can be modified by developers to change, add, or remove functionality
from Sitecore.
https://sitecorespark.com/article/introduction-to-pipelines
https://doc.sitecore.com/legacy-docs/SC75/sitecore-pipelines-sc65-66-a4.pdf
https://community.sitecore.net/technical_blogs/b/getting_to_know_sitecore/posts/using-pipelines-
with-ui-customizations
Scheduler
Sometimes it is necessary to automate some common tasks to decrease manual
efforts. Let’s say we want to trigger some emails in an interval, based on some
conditions. Or we want to schedule the publishing of an item. Sitecore provides a
way to schedule routine tasks called scheduled tasks. It is a simple way to execute
code logic within a defined interval.
1: Commands
2: Schedules
To create a command, we will have to write a code that will be executed. So, one
must create a .net class that contains the logic written within a method named as a
command from the scheduler.
For e.g.,
We have created a class by the name SendEmail, and a method Execute inside the
class.
The following method will be called when the scheduler will run within a specified
interval, and the code written inside this method will be executed every time.
Now to call this method from a scheduler, we will create a command under
/sitecore/system/Tasks/Commands/
Create a new command named SendEmail using the template from the path
/sitecore/templates/System/Tasks/Command
Provide information in the content section for the newly created command, as shown
below:
Method: Execute
Now we need to create a scheduler for this task to run the command at a specific
interval, under the path
/sitecore/system/Tasks/Schedulers/
Create a new scheduler named SendEmailSchedule using the template from the
path
/sitecore/templates/System/Tasks/Scheduler
Provide information in the content section for the newly created scheduler.
1: In the command field: Select/Specify the command path (Command created in the
earlier step).
2: In the scheduler field: Specify the time ie., how often the job needs to run.
3: Items field: If we want to populate Sitecore items array in our class method, then it
can be defined here.
4: Last run field: It will be updated by Sitecore automatically whenever the task gets
executed.
5: Async field: We can mark this filed to run the command asynchronously.
https://www.advaiya.com/blog/scheduled-tasks-in-sitecore-creating-and-scheduling/
https://sitecore-community.github.io/docs/documentation/Sitecore
%20Fundamentals/Asynchronous%20Tasks/
What is Caching?
Use the VaryByCustom function to cache multiple versions of a page based on customization
aspects of the request such as cookies, role, theme, browser, and so on.
For efficient caching use 64-bit version of Windows Server and SQL Server.
For database caching make sure your database server has sufficient RAM otherwise, it may
degrade the performance.
For caching of dynamic contents that change frequently, define a short cache–expiration time
rather than disabling caching.
Types of Caching
Prefetch cache
This is item data pulled out from the database when the site starts up - from the Sitecore docs:
"Each database prefetch cache entry represents an item in a database. Database prefetch cache
entries include all field values for all versions of that item, and information about the parent and
children of the item.
Populating the prefetch cache results in smoother user experiences immediately after application
restarts. Excessive use of prefetch caches can affect the time required for application
initialization."
Data cache
This cache is to minimise the round trips to the database, it again pulls item information from
Sitecore but the difference being it does it when the item is requested (rather than start-up of the
site); it will pull the data from the pre-fetch cache if it's there or go back to the database if not.
Item cache
This cache has objects of type Sitecore.Data.Items.Item which would be used in code; when an
item is requested in code it will look in the Item cache, then back up the data cache and up again
to pre fetch cache and finally to the database.
HTML cache
This output caches the HTML from sublayouts and renderings, there are a nice level of
configuration to only cache the HTML based on querystrings, different data etc.
Flow of cache
The following is taken
from http://learnsitecore.cmsuniverse.net/Developers/Articles/2009/07/CachingOverview.aspx
item.HASValue
http://seankearney.com/post/Checking-if-a-Sitecore-field-has-a-value
The use of Event Queue is to synchronize the different servers when a change has
occurred in the Sitecore Back Office.
Sitecore DMS
Sitecore Digital Marketing Suite is a solution package that extends Sitecore
CMS to provide advanced online marketing capabilities such as campaign
management, web analytics, visitor profiling, multivariate testing and more.
Sitecore DMS works with CMS 6.5 and later.
Item buckets
Current version: 8.1
Item buckets let you manage large numbers of items in the content tree. An item
bucket is a container that you can use to hide innumerable items and still easily
retrieve and work with these items. The only way to find bucket items is to use the
Sitecore search engine.
As your content tree grows, it gets more difficult to locate items, and performance
can decrease. For example, if you have a website that markets or sells innumerable
products or uses an ever-increasing number of media files, as you continually create
more items, your content tree becomes unmanageable. If you use an item bucket to
store your items instead, you can store an unlimited number of items in one
container without displaying them in the content tree.
All the content items in an item bucket are automatically organized in a logical
format that increases the performance of the search engine.
A single item bucket can contain millions of content items without slowing
down the UI or congesting the content tree.
You can have as many item buckets as you want. This lets you split up your
item buckets into logical containers, for example, one for products and one for
articles.
https://doc.sitecore.com/users/81/sitecore-experience-platform/en/item-buckets.html
Personalization
Current version: 9.3
https://doc.sitecore.com/users/93/sitecore-experience-platform/en/personalization.html
https://doc.sitecore.com/users/93/sitecore-experience-platform/en/the-rule-set-editor.html
Item Resolver -> Your Custom Item Resolver -> No sitecore item found -> Redirect Manager
Patch -> Still nothing -> Page Not Found Handling
URL Resolver i.e If we don’t want go through with item url or is too long but we want some
another url is this is item resolver.
Multisite
https://www.advaiya.com/blog/sitecore-multisite-architecture-single-installation/
https://doc.sitecore.com/developers/81/sitecore-experience-platform/en/configure-multiple-
managed-websites.html
MultiLingual
https://sitecore.stackexchange.com/questions/4036/sitecore-multisite-multiple-country-region-and-
multilanguage-support-implement
https://www.bugdebugzone.com/2014/02/how-to-add-new-publishing-target-in.html
Unicorn
Unicorn is a utility for Sitecore that solves the issue of moving templates, renderings,
and other database items between Sitecore instances. This becomes problematic
when developers have their own local instances - packages are error-prone and tend
to be forgotten on the way to production. Unicorn solves this issue by writing
serialized copies of Sitecore items to disk along with the code - this way, a copy of
the necessary database items for a given codebase accompanies it in source control.
https://github.com/SitecoreUnicorn/Unicorn
TDS
https://hedgehogdevelopment.github.io/tds/chapter1.html
Types of field
1. Versioned fields
2. Unversioned fields and
3. Shared fields
Versioned fields:
By default all the fields are versioned, which means the the field value will be different across
different numberd versions and different language versions as well,
example of numbered version- title/description and etc, or any such field whose field will be
different across different languages/versions.
Unversioned fields:
There are certain fields whose value is same for all the numbered versions for a specific language,
such as “Country Name”, “Employee Name” and etc, if we want to have such configuration, we
should make that field as “Unversioned” in template definition.
When this(“Unversioned”) checkbox is selected, the field has the same value for every numbered
version within a language, but may have different values between supported languages.
Shared fields:
When the field value doesn’t change across languages and number versions, we should
mark that field as shared, shared field value will be common across supported
languages and versions.
When the Shared property is set, changes to the field value in any language or
numbered version of the item will be reflected in all the other language versions and
numbered versions.Example- “Id” or some unique identifier which will be commons
across languages and versions.
https://ankitjoshi2409.wordpress.com/2017/06/26/versioned-unversioned-and-shared-fields-in-
sitecore/
To configure Glass to map your C# models to Sitecore data there are two ways:
Attribute Mapping and Fluent Configuration.
You do have an AutoMap option to for mapping fields when the Sitecore field name
is the same as your C# property on your model, but it is not recommended because
if someone changes the Sitecore field name without updating the code, the code will
break. Of course, if the names are different you will have to include the mapping
configurations (even if the Sitecore field name is the same as the model property
name except with space in between words).
For Fluent Configuration you will need to create mapping configurations (Figure 5)
and add the mapping to the configuration factory (Figure 6) in
GlassMapperScCustom.cs mentioned above. Adding this ties out the model and
configuration together so Glass Mapper can map correctly.
Figure 5:
Figure 6:
Both Attribute Mapping and Fluent Configuration are acceptable ways to do it; it is up
to you which one you like. There are opinions on which is better. Some people think
Attribute Mapping violates Single Responsibility principle as the model represents
both data structure and mapping configuration. On the other hand it may be simpler
to use than Fluent Configuration.
https://blogs.perficientdigital.com/2018/10/29/glass-mapper-part-1-of-2-what-it-is-and-how-to-use-
it/
Sitecore Habitat
Habitat is an example Sitecore solution built on the Helix architecture principles. It is
designed to show how a Helix-based solution can be architected, and to
demonstrate how tooling can be used to accomplish publishing, serialization, and
testing. Habitat is not intended to be a starter solution, or as a recommendation of
tools for your solutions.
Each time there is a change in a feature, a new one is added or one is removed,
then this layer will typically change. The layer also brings together the concrete
graphical design of the solution, which means that in terms of the Stable
Dependencies Principle, the modules in this layer are unstable. The most unstable
modules in your solution and thus, remembering the Stable Dependency Principle,
should have the fewest dependencies on it.
The Project layer is typically small and contains few modules, often determined by
the number of tenants in the solution and their needs (see Multi-site and multi-
tenant).
The features are expressed as seen in the business domain of the solution and not
by technology, which means that the responsibility of a Feature layer module is
defined by the intent of the module as seen by a business user and not by the
underlying technology. Therefore the module’s responsibility and naming should
never be decided by specific technologies but rather by the module’s business value
or business responsibility.
Each Feature layer module has to strictly conform to the Common Closure Principle.
This principle ensures that changes in one feature do not cause changes anywhere
else, and that features can be added, modified and removed without impacting other
features. For example, in a Sitecore context, it is important that all Sitecore items –
such as the interface templates and rendering items – are managed, versioned and
packaged with the views and code files of the feature. This can be done by
serialization (see Managing items in development).
Create a lib folder in your project root, and make copies of the Sitecore .dlls that you
require.
Create a central library for Sitecore .dlls within your organization.
Set up a local NuGet server within your organization to store different versions of the
Sitecore .dlls.
Dynamic Binding
Static Binding
If you are binding anything in placeholder from Sitecore then it’s called Dynamic Binding.
Here you need to map placeholder and control from Sitecore Layout details section. For
example below 3 placeholders are example of dynamic binding.
<sc:placeholder runat="server" key="HeadSection" />
<sc:placeholder runat="server" key="MidSection" />
<sc:placeholder runat="server" key="TailSection" />
If you are specifying sublayout of controls then its called Static binding. Here you don't
need to map placeholder and control from Sitecore Layout details section. For example
below 3 placeholders are example of static binding.
<sc:Sublayout ID="scHeadSection" Path="~/Common/HeadSection.ascx" runat="server" />
<sc:Sublayout ID="scMidSection" Path="~/Common/MidSection.ascx" runat="server" />
<sc:Sublayout ID="scTailSection" Path="~/Common/TailSection.ascx" runat="server" />
Insert Option
Insert Options restrict what type of items that you can add as the child of
an another item.
Marketing Automation
Forms
Headless forms
Improved bot detection features
File upload and email confirmation features
Ability to pass form fields as URL parameters and to publish forms directly from the
Forms UI
Sitecore JavaScript Services (JSS)
Ability to build JSS Apps on your local machine and connect to a remote Sitecore
server through a tunnel
Allows developers working on Macs to perform live-debugs of their JSS app
Sitecore 9.3 also comes with the Sitecore Installation Assistance (SIA), a simple
interface that makes installation a lot easier, with new email templates, and planned
enrolment for marketing automation.
https://www.jondjones.com/learn-sitecore-cms/sitecore-developers-guide/sitecore-core-
concept/sitecore-data-template-content-layouts-and-components
https://sitecoreconfig.wordpress.com/2015/09/08/sitecore-building-blocks-templates-
content-and-presentation-layouts/