I am working on OpenCart 1.5.6.4. I want to add dynamic CSS class in content box. I want the following options for the content box layout:
- left panel + main content + right panel
- only left panel + main content
- only main content + right panel
- only main content (without left & right panels)
With the following code each case except the main content + right panel is working:
<?php if ($column_left && $column_right) { ?>
<?php $class = 'col-sm-6'; ?>
<?php } elseif ($column_left || $column_right) { ?>
<?php $class = 'col-sm-9'; ?>
<?php } else { ?>
<?php $class = 'col-sm-12'; ?>
<?php } ?>
<div id="content" class="<?php echo $class; ?>">.....</div>
I get this results:
What is wrong here with the last option? How can I fix it?
Would appreciate the help.