Skip to content

Instantly share code, notes, and snippets.

@SimonEast
Created July 2, 2012 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimonEast/3030169 to your computer and use it in GitHub Desktop.
Save SimonEast/3030169 to your computer and use it in GitHub Desktop.
IF statement for columns
<?
// 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