Skip to Content
Sitecore Cookbook for Developers
book

Sitecore Cookbook for Developers

by Yogesh Patel, Patel Y Sunderbhai
April 2016
Beginner content levelBeginner
338 pages
7h 38m
English
Packt Publishing
Content preview from Sitecore Cookbook for Developers

Customizing the publishItem pipeline to avoid duplicate names on a live site

Sitecore has a very powerful publishing architecture, which is perfect for almost all cases, but sometimes, we may need to override the publishing engine as per our requirement. The <publishItem> pipeline contains many processors playing different roles in publishing items.

A very common challenge in Sitecore is to deal with duplicate item names in a single parent. In this recipe, you will learn how we can achieve a unique item name in a single parent after publishing.

How to do it…

We will create a custom processor in the <publishItem> pipeline:

  1. In the SitecoreCookbook project, create a RemoveDuplicateItems class in the Publishing folder and inherit it from PublishItemProcessor ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Azure for Developers

Hands-On Azure for Developers

Kamil Mrzygłód

Publisher Resources

ISBN: 9781784396527Supplemental Content