Height left column to be automatic as main area

  • tenoch
    Inactive member
  • Topic Author
  • Member
  • Member
More
13 years 6 months ago #9151 by tenoch
Hi
I am redisigning a site, that was made with wordpress
I am using joomla with sportal template

There is something that the wordpress template is doing, that I can´t do with sportal template

The left column in wordpress template, has automatic heigh, equal to main area
As you can see in:
www.cicloviasrecreativas.org/quienes-som...ecreataria-ejecutiva
The left column, have an image of some children at the buttom, that adjust to the bottom of main area too

But with sportal template, It looks like this:
www.cicloviasrecreativas.org/ejemplo1/es...ecreataria-ejecutiva
Is there a command that make this possible?

Thanks

Please Log in to join the conversation.

More
13 years 6 months ago #9167 by ivan.milic
Hi,

there is already built in js function that equalizes 4 bottom modules, you can use it :

BoxHeights.equalise('id1','id2',....);

You can find it in index.php of template :
Code:
<script type="text/javascript"> window.onload = function() { <?php if($bottommodules) { ?> BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1'<?php } if($showuser[6]) { ?>,'c2'<?php } if($showuser[7]) { ?>,'c3'<?php } if($showuser[8]) { ?>,'c4'<?php } ?>); <?php } ?> <?php if($uppermodules) { ?> BoxHeights.equalise(<?php if($showadvert[1]) { ?>'c5'<?php } if($showadvert[2]) { ?>,'c6'<?php } if($showadvert[3]) { ?>,'c7'<?php } if($showadvert[4]) { ?>,'c8'<?php } ?>); <?php } ?> } </script>


To be able to use it you must give id attribute to elements you want to equilize. Open inc/col_left.php, inc/col_main.php, inc/col_right.php

In each of them you will see div that has only class attribute
<div class="column_right">
...

you can add id with same name as class:

<div class="column_right" id="column_right" >
...

When you do that return to index.php of template and modify above code like this:
Code:
[code] <script type="text/javascript"> window.onload = function() { <?php if($bottommodules) { ?> BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1'<?php } if($showuser[6]) { ?>,'c2'<?php } if($showuser[7]) { ?>,'c3'<?php } if($showuser[8]) { ?>,'c4'<?php } ?>); <?php } ?> <?php if($uppermodules) { ?> BoxHeights.equalise(<?php if($showadvert[1]) { ?>'c5'<?php } if($showadvert[2]) { ?>,'c6'<?php } if($showadvert[3]) { ?>,'c7'<?php } if($showadvert[4]) { ?>,'c8'<?php } ?>); <?php } ?> BoxHeights.equalise('column_left','column_main','column_right'); } </script>
[/code]

Please Log in to join the conversation.

  • tenoch
    Inactive member
  • Topic Author
  • Member
  • Member
More
13 years 6 months ago - 13 years 6 months ago #9178 by tenoch
Thanks

I tried but it did not worked, I don't know if I did it fine

I have this:

inc/col_left.php
<div class="column_left" id="column_left">
<div class="column_left_top">
<jdoc:include type="modules" name="left" style="hot" />
</div>
<div class="column_left_bottom">
<jdoc:include type="modules" name="left2" style="hot" />
</div>
.....
.....

inc/col_right.php
<div class="column_right" id="column_right" >
<div class="column_right_top">
<jdoc:include type="modules" name="right" style="hot" />
</div>
<div class="column_right_bottom">
<jdoc:include type="modules" name="right2" style="hot" />
</div>
....
.....


inc/col_main.php
<div class="content_wrap" id="column_main">
<?php if ($showinset) { ?>
<div>
<jdoc:include type="modules" name="inset" style="hot" />
</div>
<?php } ?>
<div class="content_pad">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<?php if ($showtoolbar) { ?>
<div>
<jdoc:include type="modules" name="toolbar" style="hot" />
</div>
<?php } ?>
</div>

And modified the code in index.php too, but did not see any change

But in index.php, I have modified that part, because of the fix of buttom modules posted in:
www.hotjoomlatemplates.com/support-forum...-not-ligned-out-nice
Code:
<?php if($uppermodules or $bottommodules) { ?> <!-- equal heights --> <script type="text/javascript" src="<?php echo $template_path ?>/js/equal_heights.js"></script> <script type="text/javascript"> <?php $cUserArray = Array(); $cAdvArray = Array(); if($showuser[5]) $cUserArray[1] = "'c1'"; if($showuser[6]) $cUserArray[2] = "'c2'"; if($showuser[7]) $cUserArray[3] = "'c3'"; if($showuser[8]) $cUserArray[4] = "'c4'"; if($showadvert[1]) $cAdvArray[1] = "'c5'"; if($showadvert[2]) $cAdvArray[2] = "'c6'"; if($showadvert[3]) $cAdvArray[3] = "'c7'"; if($showadvert[4]) $cAdvArray[4] = "'c8'"; ?> window.onload = function() { <?php if($bottommodules) { ?> BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1'<?php } if($showuser[6]) { ?>,'c2'<?php } if($showuser[7]) { ?>,'c3'<?php } if($showuser[8]) { ?>,'c4'<?php } ?>); <?php } ?> <?php if($uppermodules) { ?> BoxHeights.equalise(<?php if($showadvert[1]) { ?>'c5'<?php } if($showadvert[2]) { ?>,'c6'<?php } if($showadvert[3]) { ?>,'c7'<?php } if($showadvert[4]) { ?>,'c8'<?php } ?>); <?php } ?> BoxHeights.equalise('column_left','column_main','column_right'); }

Thanks again
Last edit: 13 years 6 months ago by tenoch.

Please Log in to join the conversation.

More
13 years 6 months ago #9182 by ivan.milic
I don't see that render on your site , probably you removed it. Try just
BoxHeights.equalise('column_left','column_main');
instead of
BoxHeights.equalise('column_left','column_main','column_right');

maybe missing column_right on that page causes function to crash.

Please Log in to join the conversation.

  • tenoch
    Inactive member
  • Topic Author
  • Member
  • Member
More
13 years 6 months ago - 13 years 6 months ago #9184 by tenoch
Yes

I undo changes
But Also updated post above, with additional information, where I mention that index.php is modified for what was posted in:
www.hotjoomlatemplates.com/support-forum...-not-ligned-out-nice


I will try again with the information you posted

Thanks
Last edit: 13 years 6 months ago by tenoch.

Please Log in to join the conversation.

  • tenoch
    Inactive member
  • Topic Author
  • Member
  • Member
More
13 years 6 months ago - 13 years 6 months ago #9185 by tenoch
ok
I have changes applied again with only
BoxHeights.equalise('column_left','column_main');

But nothing heppened, still is not working


Thanks again
Last edit: 13 years 6 months ago by tenoch.

Please Log in to join the conversation.

Time to create page: 0.150 seconds
Powered by Kunena Forum