Created
July 2, 2012 00:25
-
-
Save SimonEast/3030169 to your computer and use it in GitHub Desktop.
IF statement for columns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// Widen the center column (no right column) when the following conditions are true | |
if (( | |
empty($rightColumnContent) // <-- this can be set in controller, will leave room in the right column if set | |
&& (empty($page) || count($page['Widget']) == 0) | |
) | |
|| $bodyId == 'events_index' | |
|| $bodyId == 'events_past' | |
) { | |
$innerColumn1Content_width = "675px"; | |
} else { | |
// Narrow center column by default (leaves room for widgets) | |
$innerColumn1Content_width = "450px"; | |
if (empty($rightColumnContent)) | |
$rightColumnContent = $this->element('frontend/widgets'); | |
if (empty($rightColumnContent)) | |
$innerColumn1Content_width = "675px"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment