November Happy Hour will be moved to Thursday December 5th.

Allan Thraen
Aug 19, 2011
  5542
(1 votes)

Summer of Code: CategoryProvider – Alternate navigation

Here’s a little Friday goodie, in the end of the summer (although the weather outside leads me to believe that summer is already over). It’s not uncommon to want to use an alternate navigation method to access your content – like for instance using the built-in categories and list pages on your web site based on a taxonomy, rather than the usual tree-structure. Or what about quickly inserting a page-listing on your front page that shows everything tagged with a certain tag? As with everything else with EPiServer CMS it’s easy to do – and there are a couple of different approaches to do it. Being geeky as usual I decided to try to accomplish a rather elegant approach to this – that’s easily installable and will work anywhere. I’ve made an automatically attaching page-provider that will turn your categories (and pages tagged with them) into an alternate navigation tree living parallel to your regular tree.

Inspired by a few of my own old posts (mostly http://labs.episerver.com/en/Blogs/Allan/Dates/2010/1/Attaching-a-Page-Provider-programmatically/), I put this together in a few hours today.

image

This plugin requires EPiServer CMS 6 R2 Enterprise. All you need to do is download the assembly and put it in your ‘bin’ folder (unblocked, of course). Then you’ll notice a new structure under your root page, identical to your categories. By default it uses a pagetype that does not have a rendering, but it’s easy to set it to use another page type in the plugin-settings of this plugin. Beneath each category you’ll see the pages/content-items that are tagged in that category. Notice that it is the actual pages you are seeing – and if you select them it’s the same page as exist somewhere else in your structure!

If you change the category assignment on any page, it’ll instantly update the tree. I find this to be particularly useful as a source of listings – like putting a listing on your front page that lists all “News” items – wherever they reside on your site.

Download the binary here and the full source here. If you find this useful, drop a comment and I’ll be happy to put it on NuGet and Codeplex.

Aug 19, 2011

Comments

Aug 20, 2011 01:07 AM

Good stuff Allan! Wizbang aka Jacob also created a cool Dyanamic Content module for doing listings on pages based on Categories. We'll get that out to the world at the soonest possibility. Thanks for sharing this stuff!

Aug 20, 2011 04:30 PM

Wow, this looks really neat. Great work Allan!

Fredrik Josefsson
Fredrik Josefsson Aug 22, 2011 11:34 AM

Nice, nice... I like it! :)

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog