Joomla Dynamic Colums in contectLayout


Author Message
RWest

Posted: 3/18/2009
Quote message 

i like to see some Joomla dynamic Left and Right side. So when ther is no right side the that that space would be taken by the content. her is some example code:

            <?php if(($this->countModules('left') == 0) && ($this->countModules('right') == 0)) { ?>

<style type="text/css">.contentLayout .content{width:99%}
</style>
<?php } ?>
<?php if(($this->countModules('left') >= 1) && ($this->countModules('right') == 0)) { ?>
<style type="text/css">.contentLayout .content{width:77%} .contentLayout .sidebar1{width:22%}
</style>
<?php } ?>
<?php if(($this->countModules('left') == 0) && ($this->countModules('right') >= 1)) { ?>
<style type="text/css">.contentLayout .content{width:77%} .contentLayout .sidebar2{width:22%}
</style>
<?php } ?>
<?php if(($this->countModules('left') >= 1) && ($this->countModules('right') >= 1)) { ?>
<style type="text/css">.contentLayout .content{width:55%} .contentLayout .sidebar1{width:22%} .contentLayout .sidebar2{width:22%}
</style>
<?php } ?>


i can edit the joomla variabls.xsl so that this is integrated:

<?php if($this->countModules('left')) : ?>


<div class="sidebar1">
<jdoc:include type="modules" name="left" style="artblock" />
</div>

<?php endif; ?>


	 <x:value-of select="begin"/>

<x:choose>
<x:when test="@id = 'sidebar1'">
<x:choose>
<x:when test="preceding-sibling::*[@id='content'] and not(following-sibling::*[starts-with(@id, 'sidebar')])">
<![CDATA[<?php if($this->countModules('right')) : ?>
]]>
</x:when>
<x:otherwise>
<![CDATA[<?php if($this->countModules('left')) : ?>
]]>
</x:otherwise>
</x:choose>
</x:when>

<x:when test="@id = 'sidebar2'">
<![CDATA[<?php if($this->countModules('right')) : ?>
]]>
</x:when>
</x:choose>


but where can i edit the CSS part?

if this comes whit the module part thats fine.

greetz RWest