In part 1 of this series, we discussed how personalization rules can be embedded within Snippets, and where ever those Snippets are added to pages, those personalization rules will execute. This is handy when you are personalizing pieces of global elements such content that appears within main navigation or footers.
In part 2, we introduced the concept of macro personalization and how we can “swap out” Snippets added to a page to personalize the entire Snippet – which is great when you are personalizing more complex items like carousels, tabsets, accordions, or if you wish to change out global elements and literally swap the entire header or footer based on a personalization condition.
So this part gets really interesting.
Using Snippets within Snippets
Snippets can be added into other Snippets 🙂 In doing so, I can also add a macro-personalization embedded within a Snippet.
So here’s our example – we have a mega menu with flyout panels within the website.
I want to swap out the content of the first flyout menu via a personalization rule.
Step 1 – Convert my existing panel contents to a Snippet
First, I will convert the content of the fly out panel to a Snippet using the Snapshot feature within BrainJocks SCORE.
Step 2 – Add the Personalization Condition
This part is just like the second blog article, except that I am defining the macro personalization within a Snippet. I already have another Snippet to swap out the 4 column category selection panel.
Step 3 – Publish and You’re Done
Yea, that’s it. Now I have a personalization that will modify my main menu based on a condition defined by my content author.
First – here’s the default Shop Menu Item…
And now, the new Shop menu item once my personalization condition is met…
So Snippets from BrainJocks SCORE are not only a significant help to the content author when building and managing reusable site features, they also provide some unique capabilities to the marketer to personalize your Sitecore website using xDB.