Start of Main Content

The Sitecore Content Export/Import Tool is an open-source Sitecore module that has gradually grown since its launch in 2017. It was initially designed to prevent a client from having to make custom export tools whenever they needed a report of their Sitecore content. The tool can export fields on multiple Sitecore items to generate a report in minutes with thousands of lines of content. It can also filter by template, content author, date, etc.

Last year we introduced the Import feature, which allows content authors to create or update content in bulk using a CSV (comma-separated values) file. This feature accelerates Sitecore content entry and has been used in numerous Velir projects to save days and weeks’ worth of content entry for our clients. It can create basic template items as well as complete pages using branch templates. And it can be used in tandem with the Export feature to accelerate large Sitecore content migrations.

We also wanted to share some additional features of the tool: the special audits and Rendering Parameters Import.

Get assistance with auditing your website's content. Learn about our Sitecore experience.

Our Sitecore MVPs can help you migrate and update your content efficiently to save your organization time and money.

Component Audit

The Component Audit creates a report of all the components (or renderings) on each page item. This audit uses the same filters as the regular export, so you can select a starting path, specific page templates, and the other filters you want. This report can be used to find every page where a particular component is used. For example, if you enter “Rich Text” in the field and run the audit (with no filters), it will tell you every page in your Sitecore instance that has a component named “Rich Text.”

In addition to reporting every component on each page, the report also provides the datasource of the component as a Sitecore path and the datasource template (if applicable).

The Obsolete Component Audit will check all components in /sitecore/layout/Renderings and /sitecore/layout/Sublayouts, and report all the components that do not have any referrers—meaning, components that aren’t used by any pages. This is helpful if you want to clean up your Sitecore instance by deleting components you no longer use.

A screenshot of the Component Audit and Obsolete Component Audit options in the Sitecore Export/Import Tool. The instructions for the Component Audit say, “Run this export to audit the components on each Sitecore item. You can use the Start Item, Template and Created/Published Date filters and Language options to select items. The exported data will include the name of component, the page it is on, and any associated datasource item.” There is also an optional field for Component Names, which only reports instances of the specified components.

Rendering Parameters Audit

The Rendering Parameters Audit is like the Component Audit, but it reports the rendering parameters of each rendering on a page. This audit is intended to be used with filters, to report on a narrower range of pages and give as much detail as possible about each rendering on those pages. The report includes every parameter for each rendering. This report is useful when your renderings have custom rendering parameters such as display options, and you need to know which options are selected for each rendering on numerous pages. This audit can also help you test if the Rendering Parameters Import worked correctly. More on that later.

A screenshot of the Rendering Parameters Audit in the Sitecore Export/Import Tool. The instructions for it say, “Run this export to get all of the Rendering Parameters on each Sitecore item. You can use the Start Item, Template and Created/Published Date filters and Language options to select items. This export will look the same as a Content Export but will include Rendering Parameters rather than Template Fields. Supported options: Template Name, Item Name, Item ID, Start Item(s), all Filters.”

Personalization Audit

The Personalization Audit generates a report of every page that has a personalized component on it, and which component(s) are personalized. This is useful if you need to find out where personalization rules have been implemented. This audit uses the same filters as the export feature.

A screenshot of the Personalization Audit in the Sitecore Export/Import Tool. The instructions for it say, “Run this export to get a report of every item that has personalization on one or more renderings. You can use the Start Item, Template and Created/Published Date filers. Supported options: Template Name, Item Name, Item ID, Start Items(s), all Filters.”

Deletions Audit

The Deletions Audit generates a report of all items that are in the Recycle Bin, including the item’s full path, ID, and date of deletion. This tool can be used just for reporting but can also be used with the Import feature to automatically delete the same items (by path) on other environments. This audit uses the same filters as the Export feature, as well as its own optional date filters for date of deletion.

A screenshot of the Deletions Audit in the Sitecore Export/Import Tool. The instructions for it say, “Run this export to get a CSV of the paths of all items in the recycle bin. Works with the Start Item field. This CSV can be used to promote deletions to another environment.” There are also fields for deletions between specific dates and radio button options for “All Deleted items” and “My Deleted items.”

User Audit

The User Audit generates a report of all users, with the option to filter by role or by admin.

A screenshot of the User Audit in the Sitecore Export/Import Tool. The instructions for it say, “Run this export to get a CSV of users and their roles.” There is an optional dropdown menu to select a user role and a checkbox for “Admins only.”

Rendering Parameters Import

Since this is the most complex feature of the tool, we recommended that it’s only used by experienced Sitecore developers. The Rendering Parameters Import changes the presentation details of Sitecore pages. It can change the position of a rendering (i.e., move it higher or lower on the page), either relative to the whole page or relative to the placeholder it’s in. It can also change the value of a rendering’s rendering parameter; it can move the rendering to a difference placeholder; or it can delete a rendering.

A screenshot of the Rendering Parameters Import with instructions on how to use it. They say, “Use this import method to modify the rendering parameters (FINAL LAYOUT) of the components on your Sitecore items. This import is recommended for when you have a rendering(s) that exists on a large number of pages and need to: change the placeholder it lives in on every page; change its position on the page (i.e., make it first, or put it above or below another rendering) on every page; change the value of the rendering parameters on every page.”

A use case for this feature is when a new field is added to the rendering parameters template, and this field needs to be set on every instance of this rendering on a particular part of the site, but not on the whole site. If the new field needed to have the same value on every instance of the rendering sitewide, it could just be set in the Standard Values. But this cannot be used if it only needs to be that value in certain places.

A screenshot of an item’s Control Properties in Sitecore where the boxes Display Dates, Display Content Type Labels, Display Descriptions, and Feature First are checked.

This could be done manually, but it’s more efficient to use our tool and a CSV. With a CSV, you can configure the following:

A CSV screenshot that contains the columns Item Path, Apply to All SubItems, Template, Component Name, Parameter, Value. The column "Apply to All SubItems" has a value of "True".

Item Path: The first Sitecore item that is used to modify the rendering parameters on.

Apply to All Subitems: Setting this to TRUE will apply the same changes to all subitems of the item selected in Item Path. If Apply All Subitems is set to FALSE (or left blank) then only this page will be affected.

Template: This works as a filter on the subitems (and parent item), so that only items with the given template ID will be modified.

Component Name: This determines which rendering is modified.

Parameter Name: The name of the field on the parameters template.

Value: The new value for the parameter.

When run, this will update the first instance of the Dynamic Content Listing rendering on every item under and including /sitecore/content/Home/News and Publications that has the template ID of {0C887AB2-FB9C-42CD-BD93-B89041CF01FE}, by updating the rendering parameters to set Display Images to “16 x 9” and Display Authors to TRUE. If you want to update every Dynamic Content Listing rendering, then you can add the column All Matching Components and set it to TRUE. This will update the rendering parameters for all Dynamic Content Listings on each item (within the selected placeholder, if specified).

A second example would be to move a rendering to another position. In this CSV configuration, we are moving the first instance of every Rich Text rendering to be the first rendering on the page. And we are moving the second Dynamic Content Listing to come after the last Breadcrumb rendering.

A CSV screenshot that contains the columns Item Path, Apply to All SubItems, Template, Component Name, Nth of Type, Placeholder, Position, Position in Placeholder, Before, and After. In the After column for the second row/component, the value is set to “Breadcrumb.”

Without the Rendering Parameters Import, if a Sitecore user needed to remove every instance of a rendering from lots of pages, move a rendering to a different position or placeholder, or change the parameters of the rendering, a content author would have to navigate to the page in Sitecore, open the Presentation Details, and move or edit the rendering. This is fine for one item, but if the same changes need to be made on tens of items, hundreds of items, or even a handful of items where each one has 5 or more instances of the rendering, this work can take hours.

Configuring the CSV file is the hardest part of the import, but once it’s set up, the process takes a few minutes. However, we recommend that only developers or content authors with a strong understanding of how Rendering Parameters work try to use the Rendering Parameters Import, since it's more complicated than the Content Import and could mess up a lot of pages if used incorrectly. That’s why we also recommend that you always make a backup Sitecore package of your content before running an import!

The Sitecore Content Export/Import Tool is open source so we encourage you to experiment with it, and open issues or pull requests on Github if you find bugs, have suggestions for new features, or have completed your own code changes that you would like to be included in the module. We’d also love to hear about your experiences and successes using the Content Export Tool! Reach out to us, or find us on Twitter or LinkedIn to let us know.

Published:

Latest Ideas

Take advantage of our expertise with your next project.