Skip to main content

Data & Intelligence

How to Exclude Templates for Selection in Personalization Rules in Sitecore 8

Wondering if it’s possible to only allow subfolders to be selected ­- and not the parent folder – in the Personalization Rule Set Editor in Sitecore 8? Recently one of our clients asked me the same question. Getting more and more in tune with Sitecore lately, I thought, “Oh, of course, this is possible. Right?”

First things first, I did a little investigating on the Internet to make sure someone hasn’t documented this issue already. But that search didn’t yield the right results. So after digging and debugging in Sitecore, I found the solution and wanted to share it. Follow these simple steps, and you’ll be good to go.

4 Easy Steps

  1. Find the GUID of the template you want to eliminate from selection.

Img1

  1. Next, create a custom dll to override the Rules Macro.

Img2

  1. Create a new Macro that points to the custom dll.

Img3

  1. Edit the Rule you want to use the new Macro. That’s it!

Img4

Below you can see the changes in action.

Img5

Img6

Img7

Img8

Go ahead and give it a try for yourself!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Joe McNett

Joe loves the challenge of solving tough problems. With over 10 years of expertise with Salesforce, software development and data integration, Joe always feels rewarded to see how final solutions benefit clients.

More from this Author

Follow Us