Nested Editable Areas
<?php $this->controller->subArea(); ?>
I recently made a template for this addon for each of the available jQuery effects but am sure a giant slew of new addons would emerge with this functionality. Rapidweaver 5, a different CMS currently uses "stacks" where the programmer can easily add a %slice% command which opens a spot for the user to interface and add any additional "stack". The combination of effects and functionality the user experiences is truly amazing. (You could literally place a jQuery fadeIn effect so that your accordion or your ecommerce eases in).
Please, I beg of you, add subAreas to Concrete5 like Matogertel did with his Area Splitter addon.
1. For the blocks in the area, go into 'Design' and give them classes of 'col1-blocks' or 'col2-blocks'.
2. Then, beneath the blocks, add an HTML block that does the dirty work with a bit of jQuery.
PS. In last week's Totally Random Andrew and Franz mentioned something about stacks for 5.5, so you may get your wish.
Instead of trying to shoehorn this into a block, it might make more sense to have your users just create an area layout and put their blocks in there.
What I've done in the past is make custom blocks (using Designer Content) for the contents of the tabs, having a field for tab title and tab content, then in the template it pulls out the name from each block controller. But this is a bit advanced and requires a good understanding of PHP. It also restricts you to one kind of block in all the tabs.
Another way I've seen it done (and this is used by several addons in the marketplace that do tabs or accordions) is to make a global scrapbook, and each block in the global scrapbook serves as a tab (and scrapbook blocks *do* have names so this can be used for the tab names). But this is not an optimal editing experience in my opinion -- it's better to edit things on the page itself then to have to go to the dashboard scrapbook manager.
Another solution that might work, although it's a little hacky, is to create a custom block that serves the purpose of collecting the tab/accordion names. The block doesn't actually display anything but just provides the user with a textbox to enter tab names into. Or you could have one block per tab name, so the blocks in the area would alternate between a special "title" block and then the actual content.
Wish I had a better answer for this, but unfortunately there's no perfect way to do it (so your idea to use area splitter may actually be the best one).
Or, why not just continue using the Area Splitter block if that fits the bill?
In my client work I'm finding that a big goal is to TAKE AWAY flexibility with a mind to make things simpler with less of a leaning curve. Having too many choices can be a bad thing. Too many steps is DEFINITELY a bad thing :-)
Teaching a client how to use the Layout tool? I'd rather not have them have to do so many things... or have that much power to make the site ugly. The client usually doesn't have design skills. So I'm starting to disable both the Layout and Design options.
I just implemented this simple tutorial to create some tabs (didn't use jQuery UI, though):http://werstnet.com/blog/creating-an-accordion-pane-in-concrete-5/...
It isn't perfect, but I like it better than using Layouts.
EDIT: using the tutorial, reordering the tabs is probably too cumbersome for the average client to do... but I think that's an issue with using a Layout also.
I just had a play with the built in layouts and I am not sure I could have achieved exactly the same as I did with jQuery, but could have done something pretty close with the benefit of a more WYSWYG editing experience. I will have to keep them in mind for next time I need to split the display.
Going from the descriptions of many of the area splitting addons (be it menus, accordions, tabs, expanders .....)(I have not used most of them), many (but not all) seem to map whatever they are doing with blocks 1:1, where in many cases I would like to have a more flexible 1:many mapping like I now understand the ones that use layouts do. This could just be unclear descriptions, so a perceived issue rather than a real issue.