CMS – How to Align Multiple Static Blocks on a CMS Page

cmsstatic-block

I'm revamping my home page to include 4 static blocks with text content. To test my layout I've created 1 standard static block and inserted it 4 times as a widget within my CMS homepage. The problem I'm having is to get them aligned properly.

I suspect I am going about this the wrong way.

I know how to create a phtml file that will call each static block and align them via CSS, I just don't know if I need to add this to a layout file or to call it within the CMS page.

What is the best method to insert and align 4 static blocks on a CMS page?

Best Answer

By alignment you mean your layout right?

This is what i do for all of my CMS pages in order to keep them in .phtml files and handle the presentation via CSS.

Add this snippet to your CMS Homepage's Layout: <reference name="content"> <block type="core/template" name="default_home_page" template="cms/home.phtml"></block> </reference>

then create a file on /app/design/frontend/yourpackage/yourtheme/cms/home.phtml and put your content there. Align them via CSS strictly. I know it's not easily editable but it's a clean solution for a developer.