Posts

Showing posts from October, 2022

Modified Existing Pipeline to prevent when user deleting the content item

Image
 This functionality implemented for, when user deleting the item, we are moving item to deletion workflow state instead of deleting the content item completely. Alternatively we can say like "Remove the Delete access right from wherever you have defined it in your content tree." For detailed reference, the below link covers https://sitecore.stackexchange.com/questions/19262/adding-workflow-for-item-deletion Step 1 :  We need to create  Deletion Approval  workflow state. It contains the commands  Approve  for deletion and  Reject . Approve command has the  Delete  action. Step 2 :  Then we have to create config file to update existing pipeline. It will patch(run) the processor, when user deleting content item in sitecore. We have to specify type(Full class file name, AssemblyName), method(name of method). Step 3 :  We have to create class file to write the logic for updating  Deletion Approval  workflow state for the conten...

Updated Existing Pipeline to Upload image in Azure blob

Image
  We are uploading the media items in azure blob, after user uploads image sitecore. We are storing the url value in   CDN file path  field   in Sitecore. Step 1 :  First we have to create media item templates under our current site. It should inherit the standard sitecore media item template. The path of standard sitecore media item template :  /sitecore/templates/System/Media/Unversioned/ We inherited one more base template  _baseMediaExternalPath  and it has the field  CDN file path.  It is used to store image url in azure blob. The reason for creating custom media template, each media item should have the  CDN file path  field. Step 2 :  Then we have to create config file to update existing pipeline. It will patch(run) the processor, after uploaded image has been saved in sitecore. We have mentioned custom class file path, Name, Path (sitecore media library item) and list of templates, we want to update template of the...

Implemented Sitecore Commands

Image
  We have customized sitecore ribbon in core database. Where we have to create Reference, Strips and Chunks. For detailed reference, the below link covers. https://cmsview.wordpress.com/2015/03/17/sitecore-8-for-beginners-adding-custom-button-to-ribbon/ Step 1 :  First we have to create  Reference  and  Strips  in core database. Finally we have to create  Chunks  in the following file path : /sitecore/content/Applications/Content Editor/Ribbons/Chunks/ Inside the  Chunks , we have to create button and it has  Click  field where we have specify the command name which is mentioned in command config file ( item:custompreviewbutton) Step 2 :  We have to create config file to initialize the command. We have to specify the CommandName and Type(Full class file name, namespace) Step 3 :  We have to create class file to write the logic for command what should happen when user clicked button from the ribbon. Here, we are redire...

Created custom field in Sitecore

Image
Step 1:  First we need to create the field in Core database. I have created Multilist field. We have to create the field in below Path /sitecore/system/Field types/List Types/ In the  Control  field, we have to provide the value as "prefix:ClassFileName". Step 2 :  We have to create config file to initialize the custom field. We have to specify the Namespace, AssessmblyName and Prefix. Step 3 :  We have to create class file to write the logic for updating DataSource for the custom field. In the logic  StartSearchLocation  will be replaced as current site which is parent of current item. Path of the class file :  Cirrus.Foundation.SitecoreExtensions.CustomFields.CustomMulltiListSearchField Step 4 :  Need to set the DataSource value for our custom field. DataSource  is nothing but when we creating the filed with custom field type, where we have to specify the DataSource for the multilist field.  StartSearchLocation=$sitenode&Templ...