Elxis CMS Forum

Support => General => Topic started by: MrEmz on August 15, 2012, 14:11:26

Title: Re: Hide or show left and/or right column
Post by: MrEmz on August 15, 2012, 14:11:26
I want to disable the left column from home page so that i can utilize the space for some items.

<?php if (currentpage != homepage) {?>
   <div id="leftcolumn">
                <div class="inside-col">

                        <div class="sidebarbox">
                                 <?php mosLoadModules('newsflash', -2); ?>
                                 <?php mosLoadModules('banner', -2); ?>
                                 <div class="sidebarbox"><?php mosLoadModules('left', -2); ?></div>
                                 <?php mosLoadModules('user3', -2); ?>
                   
                        </div>
                </div>
   </div>
<?php
}else
       
?>

Is this good? How should i do the condition?
Title: Re: Hide or show left and/or right column
Post by: babis1 on August 15, 2012, 14:39:43
i thing this is better

<?php if($option =='com_frontpage'){ ?>
   <div id="leftcolumn">
                <div class="inside-col">

                        <div class="sidebarbox">
                                 <?php mosLoadModules('newsflash', -2); ?>
                                 <?php mosLoadModules('banner', -2); ?>
                                 <div class="sidebarbox"><?php mosLoadModules('left', -2); ?></div>
                                 <?php mosLoadModules('user3', -2); ?>
                   
                        </div>
                </div>
   </div>
<?php } ?>
Title: Re: Hide or show left and/or right column
Post by: babis1 on August 15, 2012, 14:51:45
if you want to include statment like else then after the last </div> goes something like
}else{ something } and finished with ?>

so

<?php if($option =='com_frontpage') {
   <div id="leftcolumn">
                <div class="inside-col">

                        <div class="sidebarbox">
                                 <?php mosLoadModules('newsflash', -2); ?>
                                 <?php mosLoadModules('banner', -2); ?>
                                 <div class="sidebarbox"><?php mosLoadModules('left', -2); ?></div>
                                 <?php mosLoadModules('user3', -2); ?>
                   
                        </div>
                </div>
   </div>
}
else{ something }
 ?>
Title: Re: Hide or show left and/or right column
Post by: MrEmz on August 15, 2012, 14:56:58
It works! Thanks! But i want to disable the left column so that the frontpage content will get the space for the left column. I only hide the column but the space is still there empty. Sorry im not clear.
Title: Re: Hide or show left and/or right column
Post by: babis1 on August 15, 2012, 15:13:28
in that case you must check the whole template and the css, because somewhere have exactly values maybe before leftcolumn