Manually create layouts?

Permalink
Hi,

I'm trying to develop a site for someone, in which they would want to have blocks to show in 'different layouts' e.g. 3 blocks on one line all the same size, 2 blocks with one wider than the other etc.

I know C5 has the layout tool which allows the user to customise the width of the block space they want to use, however I would like to be able to allow the client to choose from a set list of layouts, to which they can then add in the blocks into the new created areas.

Ideally they would be able to create a layout, choose from pictures of available layouts (like how you might currently choose a page type etc.) and then that would create the fixed blocks for them to then add to.

I had planned on creating this as a block, but it seems that C5 doesn't like the creation of blocks within blocks. I have seen the area splitter in the marketplace, but it doesn't exactly fit my needs (although I could pull the code out and apart to make my custom layout block).

I guess my question is; could there be a manual way to create a layout via a block, or a way to perhaps 'extend' the layout system so that a fixed layout could be created at any time using graphics to distinguish between them?

Cheers,

Dan

 
Danives replied on at Permalink Reply
Just for those who are interested in how I am *currently* doing it, inside of my block I do the following:

<?php  
   defined('C5_EXECUTE') or die("Access Denied.");
   global $c;
   if ($c->isEditMode()): ?>
      </div><div>
        <?php endif; ?>
        <!-- Add in the extra blocks that you want here -->


Only issue with that is you get a nice empty 'red bar' at the top of the newly added blocks - although I like to write in there 'click to delete the below layout' so it serves a purpose.
Sergefactor replied on at Permalink Reply
Sergefactor
You should just make different page types then all your client would have to do is choose which page layout design they want. It's what I do when a client wanted to have multiple homepage layout options.
Danives replied on at Permalink Reply
Problem is, they want to use different layouts on the same page. So creating page types isn't an option. They want to combine maybe 10 different layouts on pages, in different orders. I'd have to create 100 page types just to account for the combinations.