How "expensive" are layers?

Topics: Customizing Orchard, General, Writing modules
Feb 2, 2012 at 3:54 AM

I am creating a site that is similar to huffPost.com. The customer wants a specific feature: rather thanhave separate tabs for each topic, they want the homepage to serve all topics. The layout stays the same, but the user selects their topic of interest (droplist) and based on that we serve all the content on the homepage specific to the topic. Some of the content is in a summarized format and you can click through to see the full content served on its own page (using routepart). 

I'm looking into whether it would be feasible to use layers to do this switching of content. I'd create a rule that looks at a cookie value to determine the layer. There would be about 25 different layers (one for each topic). Each layer would have several widgets/content items to display. As we flesh out the rest of the site I'm not sure how many other widgets and layers we'll end up having.

Would it be a bad idea to have this many layers just for the home page? What is the general flow of logic that is used to drive the layers and widgets functionality? Are the widgets for inactive layers never loaded? 

The alternative I can think of is to have a custom controller that checks the cookies/user data, and builds up a model or shape by manually loading all the relevant content items. 

Coordinator
Feb 2, 2012 at 4:00 AM

You don't want to use layers for that, not because of perf, but because that is not at all what they have been built for. Taxonomies look like a perfect fit, with maybe Projector or a custom controller.

Feb 2, 2012 at 4:24 AM
Edited Feb 2, 2012 at 4:29 AM

Thanks. I read the intro to Taxonomies and that seems a lot  better suited than hacking up layers. This is my first real work in a CMS, and though I've seen the word taxonomy associated with CMSes I never knew what they were till now.