Elxis CMS Forum

Support => General => Topic started by: ROUBOS on July 09, 2010, 01:06:34

Title: Disable right column for a component page... [SOLVED]
Post by: ROUBOS on July 09, 2010, 01:06:34
Hi,
is it possible to disable visibility of a page column for a certain component?

I have a right column (div tag) for displaying some modules on my template.
Is it possible to remove this column only for the forum component? So that it allows more room for the component?
I know I can change visibility of the modules for menu items, but an entire template column?

just a thought

thanks
Title: Re: Disable right column for a component page...
Post by: nikos on July 09, 2010, 03:13:54
You must copy and paste your template into folder templates of your Elxis installation giving it another name into folder and into templateDetails.xml file. Then you have to edit layout.css and index.php files to remove one of two columns (right or left). Then into Elxis administration console assign this new template only for Component e-Forum Menu Item and is done. All above instructions are general and premise that you know a little about editing template files which i mentioned.
Title: Re: Disable right column for a component page...
Post by: ks-net on July 09, 2010, 03:53:22
yes...

no need for a second tpl...

eg.

<?php if ($option != 'com_eforum') { ?>

      <div id="leftcoln">

           </div>

   <?php }?>

******************************

in some(or more ) cases the other columns might need other css properties(other classes)... when the side column is hidden

eg.

    <?php  if ($option == 'com_eforum') {?>
      <div id="maincolnforum">
   <?php } else {?>
       <div id="maincoln">
   <?php }?>
*********************************

an other workaround is to count modules published in a position and hide the column if none is published in that position...
eg.

<?php if (mosCountModules('left') > 0) { ?>
      <div id="leftcoln">
   <?php mosLoadModules('left', -2); ?>
           </div>
<?php }?>
Title: Re: Disable right column for a component page... [SOLVED]
Post by: ROUBOS on July 09, 2010, 12:09:31
Thank you very much.  :)
Title: Re: Disable right column for a component page...
Post by: nikos on July 09, 2010, 15:32:05
yes...

no need for a second tpl...

eg.

<?php if ($option != 'com_eforum') { ?>

      <div id="leftcoln">

           </div>

   <?php }?>



Applying the code above into index.php of okto template for example, it hides the content from left column and not left column as area and the width of main content space where is displayed eForum component remains the same. The question was, how to display eForum into wider space.
Title: Re: Disable right column for a component page... [SOLVED]
Post by: ks-net on July 09, 2010, 17:45:39
Quote
in some(or more ) cases the other columns might need other css properties(other classes)... when the side column is hidden
read again above...

Quote
The question was, how to display eForum into wider space.
so was the answer!

YG. your answer in first topic was also correct.... so far in this topic there are 3 ways to make eforum-place wider..
1-other tpl
2-if coditions in index.php to hidecolumn+apply diffrent layout to tpl if a componet is present.
3-if coditions in index.php to hidecolumn+apply diffrent layout to tpl if there are no modules in a place(you have to hide all mods when in eforum and layout will change)

all cases are well-tested ...

see case2 live ....
http://www.healthwithaloe.gr/eforum/

Code: [Select]
<?php if ($option != &#39;com_eforum&#39;) { ?>
  <div id="leftcoln">
           </div>
   <?php }?>
....................   
.......... .......................
   <?php  if ($option == &#39;com_eforum&#39;) {?>
      <div id="maincolnforum">
   <?php } else {?>
       <div id="maincoln">
   <?php }?>
Title: Re: Disable right column for a component page... [SOLVED]
Post by: nikos on July 09, 2010, 18:06:44
Now we agree! In your first answer you talked only about modifications into index.php and not about layout.css also, as you completed to the second one. Important is what our friend can do from all these options. Solutions there are.

By the way... http://www.healthwithaloe.gr/eforum/ Very nice template!
Title: Re: Disable right column for a component page... [SOLVED]
Post by: ks-net on July 09, 2010, 18:18:05
you  can not see it in my first post?  i just quoted it in second post !

edit
Yg.. thanks for the comments... it is still under construction  ... but i haven't other example since this is the first time that i used those conditions exactly for the purpose(eforum) we are talking here!
Title: Re: Disable right column for a component page... [SOLVED]
Post by: ROUBOS on July 13, 2010, 22:53:46
Works perfect with the if statements
thanks

 :D ;D :)