Custom Block / Template with one row and two columns

Permalink
I want a block that lets me add in essence row(s) with two editable columns (blocks). I want to use CSS instead of Tables with a preference for 960.gs

I can accomplish what I want in a Template with:
<div class="container_12">
    <div class="grid_4">
        <code>
        <?php
            $a = new Area('Left Clm - Screen Shots');
            $a->display($c);
        ?>
        </code>
    </div>
    <div class="grid_8">
        <code>
        <?php
            $a = new Area('Right Clm - Feature Info');
            $a->display($c);
        ?>


but I would then need to keep repeating this each time I want a new row. So clearly doing it in the template is far from ideal.

I have read various articles on Custom Blocks and Custom Templates, however I am very new to C5 and am somewhat out of my depth.

So is a custom block the way to accomplish this. Any suggestions and bits of code are most welcome.

Thanks,
Neville

nevf
View Replies: View Best Answer
defunct replied on at Permalink Reply
defunct
Hi Neville,

Have you seen this block:
http://www.concrete5.org/marketplace/addons/area_splitter/...

I think it may do what you want.

Cheers,

Defunct.
cannonf700 replied on at Permalink Best Answer Reply
cannonf700
Two thoughts:
1st. Remo made a block that does this. You can read about it and download it at:
http://www.codeblog.ch/2009/06/concrete5-staff-table/...

2nd. If you upgrade to C5 5.4.x they built this function into the core. When you click the 'add to' choose the 'add layout' option and you're on your way. So in your theme you would only need one editable block instead of the two blocks nestled side by side.
Brilliant Feature!
nevf replied on at Permalink Reply
nevf
Thanks cannonf700. The staff table block looks like exactly what I want and should work with 960.gs. I have been reading Remo's C5 articles, but missed that one.

I am using 5.4.0.3 and will also look into your other suggestion tomorrow.
nevf replied on at Permalink Reply
nevf
Hi Defunct,
I just found AreaSplitter and can see it may do what I want.

That said the 'staff-table' cannonf700 mentioned looks exactly like what I'm after.

Thanks,
Neville
defunct replied on at Permalink Reply
defunct
Cool man, I didn't know that Remo had done that :)

Good luck and have fun!
nevf replied on at Permalink Reply
nevf
FYI I've used the C5 'Add Layout' option and it does just what I want. It would be even better if it let you use a grid instead of specifying <div> widths.