Post by theme » Mon Apr 11, 2016 1:56 pm

I wan to add two new position options (middle_left) in layout. i have done bellow code in override/theme/admin/controller/design/layout.php
(when i click on add module button in layout form in position drop down middle_left options are added, but for previously added layout positions, in positions drop down (middle_left) is not added

Code: Select all

$str_search=array('<?php if ($layout_module[\'position\'] == \'column_right\') { ?><option value="column_right" selected="selected"><?php echo $text_column_right; ?></option><?php } else { ?><option value="column_right"><?php echo $text_column_right; ?></option><?php } ?>','html += \'    <option value="column_right"><?php echo $text_column_right; ?></option>\';');

$str_replace=array('<?php if ($layout_module[\'position\'] == \'column_right\') { ?>
                    <option value="column_right" selected="selected"><?php echo $text_column_right; ?></option>
                    <?php } else { ?>
                    <option value="column_right"><?php echo $text_column_right; ?></option>
                    <?php } ?>
             <?php if ($layout_module[\'position\'] == \'middle_left\') { ?>
                    <option value="middle_left" selected="selected"><?php echo $text_middle_left; ?></option>
                    <?php } else { ?>
                    <option value="middle_left"><?php echo $text_middle_left; ?></option>
                    <?php } ?>','html += \'    <option value="column_right"><?php echo $text_column_right; ?></option>\';
    html += \'    <option value="middle_left"><?php echo $text_middle_left; ?></option>\';');
        $template_buffer = str_replace($str_search,$str_replace,$template_buffer);
where i'm i going wrong?

Newbie

Posts

Joined
Thu Mar 10, 2016 5:23 pm
Who is online

Users browsing this forum: julianashcroft and 9 guests