Thursday, 13 June 2019

Sitecore Standard Template Fields - Part-6



Sitecore Standard Template: Statistics Section

The Statistics section of the standard template contains the following fields (that have nothing to do with web statistics, personalization, testing, or any other aspect of experience management):
  • Created (Sitecore.FieldIDs.Created): The date and time at which the system created the version. I believe that tracking the actual item created date rather than the version created date may require customization (maybe there is a technique in the box, but it currently escapes me, as the creation date of the first version could vary by language).
  • Created by (Sitecore.FieldIDs.CreatedBy): Identifies the CMS user that created the version. I believe that tracking the actual item creator rather than the version creator may require customization  (maybe there is a technique in the box, but it currently escapes me, as the of the first version could vary by language). 
  • Revision (Sitecore.FieldIDs.Revision): A unique identifier that the system updates (almost) every time the item changes. I write "almost" because passing certain parameters to specific APIs prevents Sitecore from updating this field.
  • Updated (Sitecore.FieldIDs.Updated): The date and time at which the system last updated the version. Again, passing certain parameters to specific APIs prevents Sitecore from updating this field.
  • Updated by (Sitecore.FieldIDs.UpdatedBy): Identifies the CMS user that last updated the version.

Sitecore Standard Template: Tagging Section

The Tagging section of the Sitecore standard template contains a single field:
  • Semantics (Sitecore.Buckets.Util.Constants.SemanticsField): Stores tags that CMS users and potentially visitors to the live site can use to search for items.

Sitecore Standard Template: Tasks Section

The Tasks section of the Sitecore standard template contains the following fields:
  • Archive date (Sitecore.FieldIDs.ArchiveDate): Date/time after which the system can archive the entire item.
  • Archive Version date (Sitecore.FieldIDs.ArchiveVersionDate): Date after which the system can archive the version of the item.
  • Reminder date (Sitecore.FieldIDs.ReminderDate): Date after which to send a reminder notification by email.
  • Reminder recipients (Sitecore.FieldIDs.ReminderRecipients): Email addresses of recipients for the reminder email.
  • Reminder text (Sitecore.FieldIDs.ReminderText): Text to send in the reminder email.


Sitecore Package Designer – Dynamic Items and Dynamic Files



Sitecore package designer allows us to add the following to our Sitecore package:
  • Sitecore Items. 
  • Files (configuration, dlls, CSS... etc.).
  • Security accounts.
Also, the above items can be added in two ways:
  • Static
  • Dynamic.

So you can use the first way if you know that you have specific items or specific location path Childs, but let's assume that you want to add items or files based on creation date query?!.

Here you can use the dynamic feature provided by Sitecore Package Designer; let see who we can add items or files dynamically:

·         Open Sitecore Package Designer.
·         Create new Sitecore Package Project.
·         From the add buttons section you can see the following options:
·         Security accounts.
·         Items dynamically
·         Files dynamically
·         Items statically
·         File statically

More can be found in the following screenshot:

  • Select items dynamically; then you can see a window where you need to select the root item from a Sitecore content tree as you can see from the following screenshot:


  • After clicking select you can apply any of the following filters:
Item name filter 
All or part of the item name: Filter items by name or by a part of the name. 

Use: Select a lookup option. The lookup options are: 
  • Simple Search Simple substring search, no wildcards, not case sensitive. 
  • Regular Expression Common regular expressions and regular .NET expressions are allowed. For more information about regular .NET expressions, read the official Microsoft documentation. 
  • Wildcards Common wildcards are allowed. A question mark (?) stands for a single character. An asterisk (*) stands for any number of characters. Any other character is matched as is. Search is not case sensitive. 
Creation date filter
Within the past … days: Filters items by the date they were created. 
Note Within the past XX days function is just a UI convenience; this is not a floating date. When a user enters a number of days, this value is converted to a static date range. 
Specify dates: Filters items by the date they were created. 

Modification date filter 
Within the past … days: Filters items by the date they were modified. 
Note Within the past XX days function is just a UI convenience; this is not a floating date. When a user enters a number of days, this value is converted to a static date range. 

Specify dates: Filters items by the date they were.
Publish date filter 
Publish date: Includes only those items which are publishable on a specific date. You will get only those items from the source, which appears on the web database if you perform republishing on the Publish date.
Take workflow into account: Select the Take workflow into account checkbox if you want to apply workflow restrictions to publishing when filtering. 

Template filter: Filters items by templates that the items are based on. Only the items which are based on at least one of the templates from the list are added. 

Created by filter: Filters items by the users who created them and/or by the roles which the users who created the items belong to. Click Add to display the list of users or roles and add them to the filter.

Updated by filter: This filter works in a similar way as Created by Filter one. It filters by users who updated an item last and/or by roles which those users belong to.

Language filter: Select the checkboxes you want to make only the items in the selected languages added.

As you can see from the following screenshots:












  • Add the filters you need and click next
  • Enter the source name and now you can generate your package.

The files dynamically work the same as described for the items dynamically.



Wednesday, 12 June 2019

Sitecore Standard Template Fields - Part-5



Sitecore Standard Template: Publishing Section


The Publishing section of the standard template contains fields for managing publishing restrictions at the item level. Sitecore manages version-level publishing restrictions in fields within the Lifetime section of the standard template.

  • Publish (Sitecore.FieldIDs.PublishDate): Date after which publishing operations can publish the item to publishing targets.
  • Unpublish (Sitecore.FieldIDs.UnpublishDate): Date after which publishing operations will remove the item from publishing targets.
  • Publishing groups (Sitecore.FieldIDs.PublishingTargets): Publishing targets associated with the item. Publishing Groups is a legacy term for functionality similar to publishing targets.
  • Never publish (Sitecore.FieldIDs.NeverPublish): Prevents publishing operations from publishing the item to publishing targets.


Sitecore Standard Template: Security Section

The Security section of the Sitecore standard template contains the following fields:
  • Owner (Sitecore.FieldIDs.Owner): Identifies the CMS user that owns the item. From what I can tell, the owner is typically the user who created the item or its latest version in a language, although it is possible to change ownership of an item explicitly through the UI (or by changing the value in this field). Note that the owner does not necessarily own the current lock (the __Lock field in the Workflow section specifies the current lock owner if any).
  • Security (Sitecore.FieldIDs.Security): Defines access rights for the item. One key thing to remember here is that when you change access rights for an item, you must publish those changes to any relevant publishing target database(s).

Monday, 10 June 2019

Sitecore Standard Template Fields - Part-3



Sitecore Standard Template: Insert Options Section

The Insert Options section of the standard template contains fields that define insert options for the item. Insert options control which types of items CMS users can create (insert) beneath existing items. In general, best practice is to assign insert options in standard values for data templates rather than individual items.
  • Insert Rules (N/A): Insert rules to apply to insert options. In general, I advise the use of insert options rules, which use the rules engine, rather than insert rules, which use functionality more specific to insert options.
  • Masters (Sitecore.FieldIDs.Branches and Sitecore.FieldIDs.Masters): Insert options for the item (masters is an old name for functionality similar to insert options).

Sitecore Standard Template: Item Buckets Section

The Item Buckets section of the standard template contains fields that affect buckets and bucketing. Buckets support storage, path management, search, an nd other features for very large numbers of Sitecore items. Most of these fields apply to buckets, of which most solutions should have very few if any. The __Bucketable and __Should Not Organize In Bucket fields are exceptions to the previous statement, as they apply to items within buckets. In general, those fields should be set in the standard values of the templates associated with those items rather than in individual items.
  • Bucket Parent Reference (Sitecore.Buckets.Util.Constants.BucketParentReference): Set to the ID of the parent of the item before its relocation into a bucket. Unbucketing an item moves it back under that parent. Sitecore stores a value in this field automatically as appropriate.
  • Is Bucket (Sitecore.Buckets.Util.Constants.IsBucket): Indicates that an item is a bucket.
  • Bucketable (Sitecore.Buckets.Util.Constants.BucketableField): Indicates that an item should be hidden if it exists in a bucket. It
  • Should Not Organize In Bucket (Sitecore.Buckets.Util.Constants.ShouldNotOrganizeInBucket): Indicates not to apply bucketing operations to the descendants of an item (it will maintain its structure within a bucket).
  • Default Bucket Query (Sitecore.Buckets.Util.Constants.DefaultBucketQuery): Default filtering for bucket Search pane.
  • Persistent Bucket Filter (Sitecore.Buckets.Util.Constants.DefaultFilter): Similar to __Default Bucket Query, but read-only (CMS users cannot change the search criteria for the bucket).
  • Enabled Views (Sitecore.Buckets.Util.Constants.EnabledView): Views enabled for this item. In this context, views expose alternate user interfaces for working with items in a bucket.
  • Default View (Sitecore.Buckets.Util.Constants.ItemViews): Default view for working with items in a bucket.
  • Quick Actions (Sitecore.Buckets.Util.Constants.QuickActionField): Quick actions expose CMS operations in views and potentially other user interfaces.

Sunday, 9 June 2019

Sitecore Standard Template Fields - Part-2


Sitecore Standard Template: Help Section

The fields in the Help section of the standard template can provide context-sensitive assistance to users working with items in Sitecore. The fact that properties that expose the IDs of these fields appear in the Sitecore.TemplateFieldIDs class may indicate that Sitecore intends these fields to be relevant only to data templates (or at least, populated in data template definition items rather than standard values or individual items).
  • __Help link (Sitecore.TemplateFieldIDs.HelpLink): I could not easily find any usage of this field. I can imagine using it to develop a system that provides links to further information for working with items, for example in the Quick Info section to generate a link to external documentation, or to make the short description a link to such documentation. In that case, I feel that the field should appear in the data template for data templates rather than the standard template.
  • __Long description (Sitecore.TemplateFieldIDs.Description): Appears when a user hovers over an item in the content tree (what one might refer to as a tooltip…)
  • __Short description (Sitecore.TemplateFieldIDs.ToolTip): Appears in the item title bar.

Sitecore Standard Template: Indexing Section

The Indexing section of the standard template contains the following fields:
  • Boost (Sitecore.ContentSearch.Utilities.BoostingFieldId): Affects the relevance of item when it appears in search results.
  • Boosting Rules (Sitecore.ContentSearch.Utilities.BoostingRulesFieldId): Sitecore invokes the rules selected in this field to adjust the relevance of the item when it appears in search results.
  • Facets (Sitecore.Buckets.Utils.Constants.FacetsField): Item-specific search facets added to the global facets defined under the /Sitecore/system/Settings/Buckets/Facets item



Sitecore Standard Template Fields - Part-1



Sitecore Standard Template: Advanced Section

The Advanced section of the standard template defines the following fields:
  • Source (Sitecore.FieldIDs.Source): For clone items, identifies the cloned item.
  • Standard values (Sitecore.FieldIDs.StandardValues): For template definition items, the ID of the item that defines standard values for the template. It seems that logically, this field belongs in the data template for data templates rather than in the standard template for all items.
  • Tracking (Sitecore.Analytics.AnalyticsIds.TrackingField): For managing analytics properties associated with the item, including Profiles, Goals, and other Attributes (Campaigns, Events, Failure Actions, and Settings, including disabling analytics features for an item).

Sitecore Standard Template: Appearance Section

The Appearance section of the standard template defines the following fields:
  • Context Menu (Sitecore.FieldIDs.ContextMenu): Custom context menu for the item (often set in standard values for the template associated with the item).
  • Display name (Sitecore.FieldIDs.DisplayName): Display name for the item.
  • Editor (N/A): I believe that this field may be obsolete, or at least deprecated, from a time when items supported only a single custom editor.
  • Editors (Sitecore.Buckets.Utils.Constants.Editors): Custom editors (tabs) associated with the item (often set in standard values for the template associated with the item).
  • Hidden (Sitecore.FieldIDs.Hidden): To hide an item in content trees, select this checkbox for that item.
  • Icon (Sitecore.FieldIDs.Icon): Icon to render for the item (often set in standard values for the template associated with the item).
  • Read Only (Sitecore.FieldIDs.ReadOnly): To protect an item from updates, select this checkbox for that item.
  • Ribbon (Sitecore.FieldIDs.Ribbon): Configures a custom ribbon for the item (often set in standard values for the template associated with the item).
  • Skin (Sitecore.FieldIDs.Skin): For theming items in the Content Editor. To my knowledge, I have never seen this used.
  • __Sortorder (Sitecore.FieldIDs.Sortorder): For sorting items in content trees.
  • Style (Sitecore.FieldIDs.Style): For applying styles to items in content trees and fields in the content editor.
  • Subitems Sorting (Sitecore.FieldIDs.SubitemsSorting): For managing rules for sorting child items in content trees.
  • Thumbnail (Sitecore.FieldIDs.Thumbnail): Thumbnail image used for example when selecting a rendering.
  • Originator (Sitecore.FieldIDs.Originator): According to Sitecore’s own glossary, the intention of this appears to be the storage of the ID of the item in a branch template used to create an item. This did not seem to be the case in my simple tests, although there do seem to be some items in the Core database that have a value in this field that seems to match this purpose. The code that I think would populate this field appears obfuscated, so I gave up researching.
  • Preview (Sitecore.FieldIDs.Preview): Manages screenshots of the rendered item from various browsers.


Friday, 7 June 2019

Sitecore Standard Template Fields - Part-4



Sitecore Standard Template: Layout Section

The Layout section of the standard template contains the following fields that control how Sitecore renders an item:
  • Renderings (Sitecore.FieldIDs.LayoutField): Often defined in standard values for data templates, this is the field in which Sitecore stores shared (unversioned/untranslated) layout details for items.
  • Final Renderings (Sitecore.FieldIDs.FinalLayoutField): Typically defined in individual items rather than standard values, this is the field in which Sitecore stores the versioned and translated components of layout details.
  • Renderers (Sitecore.FieldIDs.Renderers): This is the field in which an item can specify renderers (for rendering items in the context of a page generated from another item) for use by the Sitecore.Web.UI.WebControls.ItemRenderer web control or the ItemRenderer MVC renderer.
  • Controller (Sitecore.Mvc. Names.FieldNames.Controller, which actually provides the name of the field rather than its ID): This field can specify an MVC controller to invoke when a client requests the item.
  • Controller Action (Sitecore.Mvc. Names.FieldNames.ControllerAction, which also provides the name of the field rather than its ID): This field can specify the name of an action method in the MVC controller to invoke when a client requests the item. A value in this field makes sense only when the __Controller field has a value.
  • Presets (Sitecore.Web.WebEditUtil.LayoutPresetsFieldId): This field can store references to preconfigured layout details that users can apply to items.
  • Page Level Test Set Definition (Sitecore.Analytics.AnalyticsIds.PageLevelTestDefinitionField): Manages page-level tests for the item.


Sitecore Standard Template: Lifetime Section


The Lifetime section of the standard template contains fields for managing publishing restrictions at the version level. Sitecore manages item-level publishing restrictions in fields within the Publishing section of the standard template.


  • Valid to (Sitecore.FieldIDs.ValidTo): The date after which publishing operations will remove the version from publishing target databases.
  • Hide version (Sitecore.FieldIDs.HideVersion): Prevents publishing of the version to publishing target databases.
  • Valid from (Sitecore.FieldIDs.ValidFrom): Date after which publishing operations will remove the version from publishing target databases.


Sitecore Publishing Service 7.0 Installation Guide

  About the Publishing Service module The Publishing Service module is an optional replacement for the existing Sitecore publishing methods....