Sitecore Item Audit Tool

We have come across many times when we were asked to audit the Sitecore application, which includes Sitecore content audit and solution audit and provide a summary of the complete implementation and see if everything is done as per Sitecore best practices or some compromises has been done.

This article is focused towards item audit which includes checking the templates/renderings/placeholders/content and many other aspects of the Sitecore content tree and item management.

As i got this request quite few of times now- so i thought let’s try to build a tool which can help us is understanding the Sitecore content(item) side of it and give us some actionable items to look and see if there is any scope to improve.

The main idea behind building this tool is to at least get some details from different Sitecore content  types and check if everything is well in place, normally when we review the existing Sitecore implementation these are some of the things which comes to our mind, which includes:

  1. How many page templates exists and how many of them are actually used.
  2. How many data/features templates exists and again how many of them are actually used.
  3. If standard values has been set or not.
  4. If insert options are set
  5. If template icon is set
  6. Different rendering available and if datasource-location and datasource template has been set if it’s a global rendering.
  7. If placeholders allowed controls are set to make sure we can add the components from Experience Editor and etc.

The tool is aligned to solve above points only and it’s just a start, i will continue to make updates to the tool to make it more useful.

Git-hubhttps://github.com/ankitjoshi/Sitecore-Item-Audit-Tool

Sitecore Marketplace-  https://marketplace.sitecore.net/en/Modules/S/Sitecore_Item_Audit_Tool.aspx

How to use:

AuditToolHome

There are different parameters on which you can generate the report, as i mentioned above report is based on:

  1. Page templates
  2. Data templates
  3. Feature templates
  4. Renderings
  5. Placeholders

Fields description:

  • Root path/ID(Page Items)- This field is to specify Path or ID under which your page items(which has presentation) exists. For example- If you site structure is Sitecore->content->home (under which you have all your page items) then you would have to set the ID of home item or path of home item to this field.
  • Page template folder path/ID- This field is to specify the folder path or ID under which you have your page templates created, for example- if your template structure is- /sitecore/templates/Project/SiteName/Page Types, then you would have to set this path or ID of this to this field. If you have multiple locations where your page templates are stored, then you can pass multiple IDs or paths to this field. Root path/ID(Page Items) field is required to show the correct report of page templates and once done you will have the following details from each template:

PageTemplateReport

  • Page template folder path/ID to exclude– This field is to specify the folder path or ID which you want to exclude from your Page template report. Note– Only one path/ID is allowed to set here.

So- now when we have access to this page report we can see what are the things missing and what is required to fix them, Also- it’s not that we have to fix all the highlighted items as few things are requirement based, but this report provide you that starting point which you need to make your implementation follow best practices.

Similarly we have other reports also, for example- Data template report.

  • Root path/ID(Global Items)- This field is to specify Path or ID under which your data items(global/data items) exists. For example- If you site structure is sitecore->content->Global (under which you have all your global items) then you would have to set the ID of Global item or path of Global item to this field.
  • Data template folder path/ID- This field is to specify the folder path or ID under which you have your data templates created, for example- if your template structure is- /sitecore/templates/Project/SiteName/Content Types, then you would have to set this path or ID of this item to this field. If you have multiple locations where your data templates are stored, then you can pass multiple IDs or paths to this field. Root path/ID(Global Items) field is required to show the correct report of data templates and once done you will have the following details from each template:

DataTemplateReport

  • Data template folder path/ID to exclude- This field is to specify the folder path or ID which you want to exclude from your data template report. Note- Only one path/ID is allowed to set here.

This is how feature template report look if you solution is helix based:

FeatureTemplateReport

Renderings Report:

RenderingsReport

Placeholders Report:

PlaceholdersReport

Common folder template Report: (Items that are based on default folder template)

CommonFolderTemplateReport

We can generate the report based on our requirement, if we want to generate the page template report from specific location and you don’t want to include all the templates, you can just select that specific folder item and generate it.

I will keep adding more features/improvements to it based on the feedback, but i am sure this as our preliminary audit can give us a good visibility about the item management and best practices.

Please let me know for any questions.

Happy learning 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s