Where is shared content used?

A common query about the sitecore tree is how to track down related content. For link fields this is easy to check – the links flyout shows you. Another approach is to use rendering parameters to setup which content item(s) feeds sublayouts, when this is the case the links flyout doesnt display the relationship.

Using the advanced system reporter it is easy to extend the functionality to perform this check. Note, this has been built and tested against Sitecore 6.4.

  1. Create new filter and custom implementation
  2. Create new parameter for filter
  3. If the marketing centre is being used, create new scanner
  4. Setup the new report

1. Create new filter and custom implementation

Filters can be found at /sitecore/system/Modules/ASR/Configuration/Filters. The class and assembly need setting to match your applications assembly name and class name. Attributes: Value={Value}

2. Create new parameter for filter

In our code snippet above, we use the parameter Value to query the content items. Create this in /sitecore/system/Modules/ASR/Configuration/Parameters. Note – this was setup to be of type Item Selector.

3. If the marketing centre is being used, create new scanner

Scanners allow for querying the sitecore tree – if you need to check through the marketing centre, setup a new scanner in /sitecore/system/Modules/ASR/Configuration/Scanners.

  • Assembly: ASR.Reports
  • Class: ASR.Reports.Items.QueryScanner
  • Attributes: query=fast:/sitecore/system/Marketing Center/descendant-or-self::*

4. Setup the new report

The last step is to setup the report to use all the filters, scanners and parameters as above. Reports can be found in /sitecore/system/Modules/ASR/Reports.

  • Scanners: All items & scanner created in step 3
  • Viewers: Item viewer
  • Filters: New filter from step 1

kotest