- Posts: 12
- Thank you received: 0
How to create a 3rd module position over left menu
-
enemy1
Inactive member - Topic Author
- New Member
I want to create a 3rd module above the left menu ('left' position). My idea is to make the same module position 'left2' over the left menu.
I added this line to templateDetails.xml
<position> left3 </position>
I know that I need to add this code in index.php:
<div id="left3">
<div class="left3">
<jdoc:include type="modules" name="left3" style="none" />
</div>
</div>
but I don't know in which line to add this code.
This is my code:
<div class="main_area">
<?php
if($columnLayout=="mlr") {
require(dirname(__FILE__).DS.'inc'.DS.'col_main.php');
require(dirname(__FILE__).DS.'inc'.DS.'col_left.php');
require(dirname(__FILE__).DS.'inc'.DS.'col_right.php');
} else if($columnLayout=="lrm") {
require(dirname(__FILE__).DS.'inc'.DS.'col_left.php');
require(dirname(__FILE__).DS.'inc'.DS.'col_right.php');
require(dirname(__FILE__).DS.'inc'.DS.'col_main.php');
} else {
require(dirname(__FILE__).DS.'inc'.DS.'col_left.php');
require(dirname(__FILE__).DS.'inc'.DS.'col_main.php');
require(dirname(__FILE__).DS.'inc'.DS.'col_right.php');
}
?>
<div class="clr"></div>
</div>
<?php if ($bottommodules) { ?>
<div class="bottom">
<?php if($showuser[5]) { ?>
<div class="modulerow<?php echo $bottommodules; ?>"><div id="c1"<?php if (!$showuser[6] && !$showuser[7] && !$showuser[8]) { ?> class="last"<?php } ?>><jdoc:include type="modules" name="user5" style="hot" /><div class="clr"></div></div></div>
<?php } if($showuser[6]) { ?>
<div class="modulerow<?php echo $bottommodules; ?>"><div id="c2"<?php if (!$showuser[7] && !$showuser[8]) { ?> class="last"<?php } ?>><jdoc:include type="modules" name="user6" style="hot" /><div class="clr"></div></div></div>
<?php } if($showuser[7]) { ?>
<div class="modulerow<?php echo $bottommodules; ?>"><div id="c3"<?php if (!$showuser[8]) { ?> class="last"<?php } ?>><jdoc:include type="modules" name="user7" style="hot" /><div class="clr"></div></div></div>
<?php } if($showuser[8]) { ?>
<div class="modulerow<?php echo $bottommodules; ?>"><div id="c4" class="last"><jdoc:include type="modules" name="user8" style="hot" /></div></div>
<?php } ?>
<div class="clr"></div>
</div>
<?php } ?>
<div class="footer_wrap">
<div class="footer">
<div class="footer_pad">
<jdoc:include type="modules" name="footer" />
</div>
</div>
<div class="footer2">
<div class="footer_pad">
<jdoc:include type="modules" name="bottom" style="none" />
</div>
</div>
</div>
<div style="clear:both"></div>
</div></div>
<jdoc:include type="modules" name="debug" style="none" />
<?php if($scrollToLoad) { ?>
<div id="message">
<a href="#top" id="top-link"><img src="<?php echo $template_path ?>/images/top.png" width="53" height="53" alt="top" /></a>
</div>
<?php } ?>
</body>
Could you help me?
Thank you.
Antonio
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
- Posts: 14116
- Thank you received: 1639
Please Log in to join the conversation.
-
enemy1
Inactive member - Topic Author
- New Member
- Posts: 12
- Thank you received: 0
I have another question.
I want that when the position left3 is disabled the left1 and left2 appear in the region of left 3.
I tried to modify the index.php in this way:
but when left3 is disabled I show this:
and this is with left3:
How can I do?
Thanks a lot!
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
- Posts: 6745
- Thank you received: 716
Please Log in to join the conversation.
-
enemy1
Inactive member - Topic Author
- New Member
- Posts: 12
- Thank you received: 0
page without left3
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
- Posts: 14116
- Thank you received: 1639
$showleft = $this->countModules('left');
$showleft2 = $this->countModules('left2') && !$showleft;
$showleft3 = $this->countModules('left3') && !$showleft;
Please Log in to join the conversation.