I've currently got a project on my plate where content is presented in blocks of a few different styles, for instance:
- A: Introduction area with large graphic, headline, and copy
- B: Carousel/slider with headline, slides, and copy
- C: Testimonial block with headline, photo, quote
- ... and so on.
One page might might call for a layout combination of ABBCBA, another CBBA, and so on. There are a finite number of predetermined combinations.
I'm currently planning on using Blueprints to select the template and manage the publish layouts; the vast majority of pages will live in a single channel. A page with an ABA layout (selected with Blueprints) would utilize the following fields:
Pages Channel
- Block A1 - Headline (Text)
- Block A1 - Graphic (Assets)
- Block A1 - Copy (Wysiwyg)
- Block B1 - Headline (Text)
- Block B1 - Slides (Matrix)
- Block B1 - Copy (Wysiwyg)
- Block A2 - Headline (Text)
- Block A2 - Graphic (Assets)
- Block A2 - Copy (Wysiwyg)
For a page with an ABA layout, I could setup an ABA template, like this:
{embed='blocks/block_a' headline='{block_a1_headline}' graphic='{block_a1_graphic}'}
{embed='blocks/block_b' headline='{block_b1_headline'}' ...}
{embed='blocks/block_a' headline='{block_a5_headline}' graphic='{block_a5_graphic}'}
I've been paying enough attention to chattering within the community to know that including a huge pile of embeds like this is bad news for performance; I'm starting to wrap my head around Stash, but, I haven't seen any examples that appear to relate to the problem I'm trying to solve here.
Bottom line: is there another approach that will work with less overhead, or, is this acceptable, assuming there's adequate caching in place to keep load times snappy?
Could I use a snippet for each block type, and somehow pass the different entry fields to them?
Why not Playa with a channel for each block type? This site will have 150+ pages, each with several blocks that are unique to that page. Managing that many entries would be a huge hassle for content editors.
Why not Content Elements + Mason? We're concerned about multi-lingual and workflow compatibility with Publisher, and possible issues with search.
Your help, suggestions, and feedback will be greatly appreciated. Thank you!