Width adjustment in Joomla

peterhjones

Joined: 2006-08-31
Posts: 1
Posted: Thu, 2006-08-31 21:01

I am using the joomla with the gallery component included with gallery to integrate it into JOOMLA.
My template is causing problems giving gallery more room to present the albums. I have selected "Hide Right-hand modules:". And this hides the right hand side but does not allow the middle to expand to the right hand edge of the window.

Basically this is my setup:

<div id="sidebar-l">
<div class="inside">
Bla di bla lefthand side
</div></div>

<div id="main-body">
<div id="content">
<div class="inside-content">
BLa die Bla gallery stuff
</div></div>
</div>

The index.php file does a check to see if a right side module exists (which it does, but it is hidden):
<?php if ( mosCountModules( 'right' ) <= 0 ) { ?>
<style type="text/css" media="screen">
#main-body {width:80%;}
#content{width:100%;}
#sidebar-r{width:0%;}</style>
<?php } ?>

Is there a way of telling the index.php file that a page is being generated for gallery so it can set the #content to 100%?

regards,

Peter

 
kai_tom

Joined: 2004-04-08
Posts: 347
Posted: Thu, 2006-08-31 21:26

Hi,

you can modify the index.php of your Joomla template to hide the right hand modules when Gallery is loaded.

<?php if ( mosGetParam( $_REQUEST, 'option', '' )<>"com_gallery") {
               mosLoadModules ( 'right' );
    }?>

Here is an example from my Joomla template:

<php if ( mosGetParam( $_REQUEST, 'option', '' )<>"com_gallery") { ?>
<?php if ( mosCountModules( 'right' ) ) { ?>
<!-- BEGIN: RIGHT SIDE-->
<td width="20%" valign="top">
<?php mosLoadModules ( 'right',-3 ); ?>
</td>
<!-- END: RIGHT SIDE-->
<?php } ?>
<?php } ?>

Please note that this code depends on your template

I hope that helps.

Kai
-----
http://www.gallery-addons.com