Closed (fixed)
Project:
Blueprint
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2009 at 06:04 UTC
Updated:
30 Oct 2009 at 00:20 UTC
I would like to know if it's possible to add a php if statement inside the page.tpl file that will let you use the same .tpl file for both a 2 and 3 column layout, depending on whether you have (for instance) a right block. If a right block is there, then it prints a span-12, if not, then a span-18.
IF
if ($right):
THEN
<div class="col-content span-12"> (a middle column for content in a 3 c layout)
ELSE
<div class="col-content span-18"> (a bigger left column for content in a 2 c layout)
Is this doable?
Thanks.
Comments
Comment #1
drew reece commentedThe blueprint theme already does this automatically. Take a look inside the template.php the function is
phptemplate_preprocess_page().Editing the 'classes variables' should affect the layout using only one page.tpl. The comments indicate the layout type.
Comment #2
designerbrent commentedThat's correct, in the current version, the size only needs to be changed in the template.php file.
Comment #3
designerbrent commentedOpps. Wrong status!