Creating New Blocks ("adding" instead of "adding to")

Permalink
I have created my own template with 3 horizontal boxes (or divs) across the page. Each block has a border that holds content. It works great except for the fact that I would like to add a new instance of block below. It seems that I can only "add to" the existing block. I would like another instance of the same block with its own border so that I've got 2 blocks stacked on top of each other.

I don't want to have to create a new div and edit the template each time I want to create a new block. Is this possible? (see screenshot for what I would like to do athttp://i56.tinypic.com/30ruyx4.jpg...

chai714
 
Shotster replied on at Permalink Reply
Shotster
I think you're confusing "blocks" with "areas" - very different things. A page consists of areas (which are defined within a theme). Areas are things like sidebar, header, footer, and main content, but any kind of area can be defined by a theme developer. An area can contain one or more blocks. Blocks are blocks of various types of content and are create by PHP developers.

http://www.concrete5.org/documentation/general-topics/blocks-and-ar...

-Steve
chai714 replied on at Permalink Reply
chai714
Suppose I am confusing "blocks" with "areas," - I developed this theme myself and created the 3 divs which house the content. Remember, my goal is not to have to create a new "area" aka div each time I want a new box.

How would I go about using the concrete5 CMS to stack up the blocks, as seen in my screenshot?
Mnkras replied on at Permalink Best Answer Reply
Mnkras
$a = new Area('Main');
$a->setBlockWrapperStart('<div class="border">');
$a->setBlockWrapperEnd('</div>');
$a->display($c);


Something like that?
chai714 replied on at Permalink Reply
chai714
Yes! Exactly what I was looking to do. Thank you!!

Now I just need more spacing between these areas. Do I need to create a new css class for that?
Mnkras replied on at Permalink Reply
Mnkras
that or add padding to the bottom of the same class
chai714 replied on at Permalink Reply
chai714
Worked perfect.

Thank you both for your help. Cheers.
Shotster replied on at Permalink Reply
Shotster
> How would I go about using the concrete5 CMS to
> stack up the blocks, as seen in my screenshot?

If each column is a separate area, just add blocks to the columns. Style via CSS to get the layout right. I don't know if I answered your question or not. I might not be understanding what you're asking.

-Steve