Tip: How to have a portal style home page, with page blocks, and columns
Posted: Tue Aug 12, 2008 4:07 pm
Hi there,
my client has a site setup like this:
navigation
image
column | column | column
they want to add, as needed, blocks of content to each column, with a vertical seperator for each block, and a horizontal seperator for each column!
HOW DID I DO IT:
Well, like this
I used pageblocks. IN pageblocks, I have 3 templates:
leftCol, center, and rightCol. The template is:
{content}
Meanwhile, my html template for this page, is:
SO, all home page page blocks are pulled in
here is the magic, in CSS:
div.leftColumnBlock {display:none;}
div#leftColumnWrapper div.leftColumnBlock {display:block;}
EASY!!!!
so if a block shouldn't be in a column, it is hidden.
my client has a site setup like this:
navigation
image
column | column | column
they want to add, as needed, blocks of content to each column, with a vertical seperator for each block, and a horizontal seperator for each column!
HOW DID I DO IT:
Well, like this
I used pageblocks. IN pageblocks, I have 3 templates:
leftCol, center, and rightCol. The template is:
{content}
Meanwhile, my html template for this page, is:
SO, all home page page blocks are pulled in
here is the magic, in CSS:
div.leftColumnBlock {display:none;}
div#leftColumnWrapper div.leftColumnBlock {display:block;}
EASY!!!!
so if a block shouldn't be in a column, it is hidden.