Saturday, 14 October 2017

Creating Custom ribbon with Sitecore

Create Custom Ribbon button with Sitecore:


Before start to explain let me tell you that it's very easy to create custom ribbon with sitecore.


So let's start,


First to create custom Ribbon we will goto CORE database.
Sitecore Login Page=> Desktop=> Right bottom Select CORE database



sitecore-desktop-database

To create custom Ribbon,
We need to create first ribbon then Strip and at-last chunks.
Now the Question is what are these ribbon,strip and chunks?
So let me give this answer in One line.
As you can see from the snapshot, "Top Section is Ribbon and the area it covers as subpart are strip and the buttons are chunks."
Now to create custom we will start recursively means first will create Chunks then strips and in last will ribbon.
So all the chunks, strips and ribbons are under ribbon Tree at "/sitecore/content/Applications/Content Editor/Ribbons"

sitecore-content-tree
at this path "/sitecore/content/Applications/Content Editor/Ribbons"
under the chunks,
create custom Chunks of type "/sitecore/templates/System/Ribbon/Chunk"
and made the entry for Header and ID Field for newly created chunk.


sitecore-chunk-item






and now create custom button inside this of type "/sitecore/templates/System/Ribbon/{select your button type template}"
made the field entry for button

sitecore-ribbon
at this path "/sitecore/content/Applications/Content Editor/Ribbons" under the strip, create custom strip of type "/sitecore/templates/System/Ribbon/Strip"


sitecore strip


after creating strip to display created chunk buttons we generally divided them into separate sub parts, so to achieve this goal
we will create custom subpart under strip of type "/sitecore/templates/System/Reference"
and made the entry for reference will point to custom created chunks



at this path "/sitecore/content/Applications/Content Editor/Ribbons" under the ribbons/Default, create custom ribbon of type "/sitecore/templates/System/Reference"
and made the entry for reference field which will be pointing to chunks


That's It.

Now goto to master Database and check the Custom Ribbon.

sitecore-custom-ribbon

Hope it will help!!!

Monday, 25 September 2017

Reason behind recycling IIS while development

Recycle is one of the tasks of IIS (Internet Information Services). So before going to explain let me tell you about IIS first.


sitecore-iis-error



On the IIS we do generally:

IISRESET, to start/stop www publishing services. When we do IISREST request then it applies to all applications on that are hosted on the IIS.

RESTART, to start/stop the process for particular application. Continues the services for other hosted application without any interruption.Generally, it initializes the website.

REFRESH, we generally do this process with session-oriented applications.

RECYCLE, our main focus on this because it's faster the others like RESET or RESTART. Recycle introduced from IIS6. It designed to restart only one application Pool means worker Processes

Actually When we do recycle then it creates the new process and after that HTTP.SYS dispatch the incoming request to newly created process and once all the requested got dispatched older process destroyed automatically.

Advantages of using Recycling:

  • no lost of the current application.
  • Once the process is created then older one is getting destroyed.
  • takes the guarantee of no lost of content.
  •  faster than IISRESET/RESTART.
  • Each time new data is getting stored into the worker Processes.

We can recycle the App Pool with two ways:
1. cmd> 'run AppPool/?'
2. with IIS Manager

Now come to the IIS Manager, basically, it has mainly three main components:
1. HTTP.SYS: It's kernel component, not part of w3wp.exe. It never uses virtual memory. And the main task of this component is to route the incoming request to corresponding AppPool.

2.  Worker Processes/AppPool/ w3wp.exe: It handles all the contents and also runs the dynamic contents. such as ASP.NET App.

3. IISAdmin: it manages IIS config as window services management.