- Posts: 12
- Thank you received: 0
How to create a 3rd module position over left menu
-
enemy1
Inactive member - Topic Author
- New Member
Less
More
12 years 2 weeks ago #23879
by enemy1
Replied by enemy1 on topic How to create a 3rd module position over left menu
Sorry but the code that you have send me doesn't work.
The wrong visualization appear both with the left3 disabled and with enabled.
The wrong visualization appear both with the left3 disabled and with enabled.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
12 years 2 weeks ago #23887
by ivan.milic
Replied by ivan.milic on topic How to create a 3rd module position over left menu
can you post code where you create module positions.
The following user(s) said Thank You: enemy1
Please Log in to join the conversation.
-
enemy1
Inactive member - Topic Author
- New Member
Less
More
- Posts: 12
- Thank you received: 0
12 years 2 weeks ago #23954
by enemy1
Replied by enemy1 on topic How to create a 3rd module position over left menu
I add this code in col_left.php
and that is my index.php
Code:
if ($showleft3 or $showleft or $showleft2) { ?>
<div class="column_left">
<?php } if ($showleft3) { ?>
<div class="column_left_bottom"><jdoc:include type="modules" name="left3" style="hot" /></div>
<?php if ($showleft) { ?>
<div class="column_left_top"><jdoc:include type="modules" name="left" style="hot" /></div>
<?php } if ($showleft2) { ?>
<div class="column_left_bottom"><jdoc:include type="modules" name="left2" style="hot" /></div>
<?php } ?>
</div>
<?php } ?>
and that is my index.php
Code:
$showleft = $this->countModules('left');
$showleft2 = $this->countModules('left2');
$showleft3 = $this->countModules('left3');
$showright = $this->countModules('right');
$showright2 = $this->countModules('right2');
$showuser1 = $this->countModules('user1');
$showuser2 = $this->countModules('user2');
$showuser3 = $this->countModules('user3');
$showbreadcrumbs = $this->countModules('breadcrumbs');
$showtoolbar = $this->countModules('toolbar');
$showinset = $this->countModules('inset');
$uppermodules = 0;
for ($loop = 1; $loop <= 4; $loop += 1) {
if($showadvert[$loop]) { $uppermodules++; }
}
$bottommodules = 0;
for ($loop = 5; $loop <= 8; $loop += 1) {
if($showuser[$loop]) { $bottommodules++; }
}
?>
<?php // template parameters
// template layout
$templateWidth = $this->params->get("templateWidth", "980");
$textDirection = $this->params->get("textDirection", "ltr");
$columnLeftWidth = 0; $columnRightWidth = 0; $columnLeftPad = 0; $columnRightPad = 0;
$templateWidthOutside = $templateWidth + 60;
if ($showleft || $showleft2 || $showleft3) {
$columnLeftWidth = $this->params->get("columnLeftWidth", "285");
$columnLeftPad = 8;
}else{
$columnLeftWidth = 0;
$columnLeftPad = 0;
}
if ($showright || $showright2) {
$columnRightWidth = $this->params->get("columnRightWidth", "285");
$columnRightPad = 8;
}else{
$columnRightWidth = 0;
$columnRightPad = 0;
}
$contentWidth = $templateWidth - $columnLeftWidth - $columnLeftPad - $columnRightWidth - $columnRightPad;
$headerMenuWidth = $templateWidth - 410;
$overallWidth = $templateWidth;
$roundedWidth = $overallWidth - 52;
// add-ons
$imageReflectionLoad = $this->params->get("imageReflectionLoad", "1");
$scrollToLoad = $this->params->get("scrollToLoad", "1");
// template style
// check if in parameters
$templateStyle = $this->params->get("templateStyle", "1");
// check if it cookie
if(isset($_COOKIE['Style']))
{
$templateStyle = $_COOKIE['Style'];
}
$templateStyleTest = "";
// check if in link
if (isset($_GET['style'])) {
$templateStyleTest = $_GET['style'];
}
if ($templateStyleTest) {
$templateStyle = $templateStyleTest;
$Month = 2592000 + time();
setcookie("Style", $templateStyle, $Month);
}
if($templateStyle) {
require(YOURBASEPATH."/styles/style".$templateStyle.".php");
}else{
$columnLayout = $this->params->get("columnLayout", "mlr");
$mainFontSize = $this->params->get("mainFontSize", "12");
$modulesFontSize = $this->params->get("modulesFontSize", "11");
$bodyText = $this->params->get("bodyText", "#6D6D6D");
$linkColor = $this->params->get("linkColor", "#000000");
$backgroundImage = $this->params->get("backgroundImage", "1");
$backgroundColor = $this->params->get("backgroundColor", "#ffffff");
$transparentImage = $this->params->get("transparentImage", "black");
$contentBg = $this->params->get("contentBg", "#ffffff");
$columnLeftColor = $this->params->get("columnLeftColor", "#616161");
$columnRightColor = $this->params->get("columnRightColor", "#c10000");
$topMenuText = $this->params->get("topMenuText", "#ffffff");
$topMenuHoverText = $this->params->get("topMenuHoverText", "#FFD200");
$topMenuSubText = $this->params->get("topMenuSubText", "#ffffff");
$headerMenu = $this->params->get("headerMenu", "#ffffff");
$mainMenuText = $this->params->get("mainMenuText", "#6D6D6D");
$mainMenuHoverText = $this->params->get("mainMenuHoverText", "#A24500");
$mainMenuTextActive = $this->params->get("mainMenuTextActive", "#A24500");
$componentHeadingText = $this->params->get("componentHeadingText", "#FF7200");
$headingText = $this->params->get("headingText", "#6D6D6D");
$headingHoverText = $this->params->get("headingHoverText", "#FF7200");
$columnFirstWord = $this->params->get("columnFirstWord", "#A24500");
$columnHeading = $this->params->get("columnHeading", "#A24500");
$columnBottomText = $this->params->get("columnBottomText", "#FFFFFF");
$columnText = $this->params->get("columnText", "#6D6D6D");
$bottomModulesBg = $this->params->get("bottomModulesBg", "#460000");
$bottomModulesText = $this->params->get("bottomModulesText", "#ffffff");
$bottomModulesHeading = $this->params->get("bottomModulesHeading", "#FF7200");
$carouselTextColor = $this->params->get("carouselTextColor", "#ffffff");
$carouselLinkColor = $this->params->get("carouselLinkColor", "#DCFF1A");
$scrollerTextColor = $this->params->get("scrollerTextColor", "#ffffff");
$scrollerHeadingColor = $this->params->get("scrollerHeadingColor", "#FFDE25");
}
?>
<link rel="stylesheet" href="<?php echo $template_path ?>/css/template_css.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $template_path ?>/css/layout.css" type="text/css" />
<?php if ($textDirection=="rtl") { ?>
<link rel="stylesheet" href="<?php echo $template_path ?>/css/rtl.css" type="text/css" />
<?php } ?>
<style type="text/css">
<!--
<?php require(dirname(__FILE__).DS.'/css/template_css.php'); ?>
-->
</style>
<!--[if lt IE 9]>
<style type="text/css">
<?php require(dirname(__FILE__).DS.'/css/template_css_ie78.php'); ?>
</style>
<![endif]-->
<?php
/* The following line loads the MooTools JavaScript Library */
JHtml::_('behavior.framework', true); ?>
<!-- top menu -->
<script type="text/javascript">
function mainmenu(){
jQuery("#nav ul").css({display: "none"}); // Opera Fix
jQuery('#nav > li.active').prev().css('border-right', 'none'); // removing border from the previous button of the active button
jQuery("#nav li ul li.current").parent().css({ visibility: "visible" }).show(); // if active link is in sublevel, make this submenu visible
jQuery("#nav li.current ul > li").parent().css({ visibility: "visible" }).show();
jQuery("#nav > li").hover(function() {
jQuery("#nav li ul li.current").parent().css({ visibility: "hidden" }).hide();
jQuery("#nav li.current ul > li").parent().css({ visibility: "hidden" }).hide();
jQuery(this).find('ul:first').css({ visibility: "visible",display: "none" }).show();
},function(){
jQuery(this).find('ul:first').css({ visibility: "hidden" });
jQuery("#nav li ul li.current").parent().css({ visibility: "visible" }).show();
jQuery("#nav li.current ul > li").parent().css({ visibility: "visible" }).show();
});
}
jQuery(document).ready(function(){ mainmenu();});
function mainmenu2(){
jQuery(" #nav2 li ").hover(function(){
jQuery(this).find('ul:first').css({visibility: "visible"});
},function(){jQuery(this).find('ul:first').css({visibility: "hidden"}); });}
jQuery(document).ready(function(){ mainmenu2();});
</script>
<?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">
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>
<?php } ?>
<?php if($imageReflectionLoad) { ?>
<!-- reflection -->
<script type="text/javascript" src="<?php echo $template_path ?>/js/reflection.js"></script>
<?php } ?>
<?php if($scrollToLoad) { ?>
<!-- scrollTo -->
<link rel="stylesheet" href="<?php echo $template_path ?>/css/scrollTo.css" type="text/css" />
<script type="text/javascript" src="<?php echo $template_path ?>/js/scrollTo.js"></script>
<?php } ?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7534151-7']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="wrapper1"><div class="wrapper_outside">
<div class="header">
<div class="logo">
<a href="index.php"><img src="<?php echo $template_path ?>/images/logo_<?php if($transparentImage=="white") { echo "black"; }else{ echo "white"; } ?>.png" width="381" height="96" alt="joomla restaurant template" /></a>
</div>
<div class="header_menu">
<jdoc:include type="modules" name="user9" />
</div>
</div>
<?php if ($showuser3) { ?>
<div id="topmenu"><div id="topmenu_l"><div id="topmenu_r"><div id="topmenu_c">
<div id="topmenu_pad">
<div class="sportal_menu"><jdoc:include type="modules" name="user3" style="none" /></div>
<div class="sportal_search"><jdoc:include type="modules" name="user4" style="none" /></div>
</div>
</div></div></div></div>
<?php } ?>
<?php if ($showuser1 or $showuser2) { ?>
<div class="gallery">
<div class="gallery_pad">
<jdoc:include type="modules" name="user1" style="xhtml" />
<?php if ($showuser2) { ?>
<div class="user2">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
<?php } ?>
<div class="clr"></div>
</div>
</div>
<?php } ?>
<?php if ($uppermodules) { ?>
<div class="upper">
<?php if($showadvert[1]) { ?>
<div class="modulerow<?php echo $uppermodules; ?>"><div id="c5"<?php if (!$showadvert[2] && !$showadvert[3] && !$showadvert[4]) { ?> class="last"<?php } ?>><jdoc:include type="modules" name="advert1" style="hot" /><div class="clr"></div></div></div>
<?php } if($showadvert[2]) { ?>
<div class="modulerow<?php echo $uppermodules; ?>"><div id="c6"<?php if (!$showadvert[3] && !$showadvert[4]) { ?> class="last"<?php } ?>><jdoc:include type="modules" name="advert2" style="hot" /><div class="clr"></div></div></div>
<?php } if($showadvert[3]) { ?>
<div class="modulerow<?php echo $uppermodules; ?>"><div id="c7"<?php if (!$showadvert[4]) { ?> class="last"<?php } ?>><jdoc:include type="modules" name="advert3" style="hot" /><div class="clr"></div></div></div>
<?php } if($showadvert[4]) { ?>
<div class="modulerow<?php echo $uppermodules; ?>"><div id="c8" class="last"><jdoc:include type="modules" name="advert4" style="hot" /></div></div>
<?php } ?>
<div class="clr"></div>
</div>
<?php } ?>
<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 } ?>
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
12 years 2 weeks ago #23964
by ivan.milic
Replied by ivan.milic on topic How to create a 3rd module position over left menu
Use , but keep previous change I have sent you:
Code:
if ($showleft3 or $showleft or $showleft2) { ?>
<div class="column_left">
<?php if ($showleft3) { ?>
<div class="column_left_bottom"><jdoc:include type="modules" name="left3" style="hot" /></div>
<?php } ?>
<?php if ($showleft) { ?>
<div class="column_left_top"><jdoc:include type="modules" name="left" style="hot" /></div>
<?php } ?>
<?php if ($showleft2) { ?>
<div class="column_left_bottom"><jdoc:include type="modules" name="left2" style="hot" /></div>
<?php } ?>
</div>
<?php } ?>
The following user(s) said Thank You: enemy1
Please Log in to join the conversation.
-
enemy1
Inactive member - Topic Author
- New Member
Less
More
- Posts: 12
- Thank you received: 0
12 years 2 weeks ago #23970
by enemy1
Replied by enemy1 on topic How to create a 3rd module position over left menu
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
12 years 2 weeks ago #23978
by ivan.milic
Replied by ivan.milic on topic How to create a 3rd module position over left menu
You have this:
so if you have left , left2 and left3 will be hidden
Code:
$showleft = $this->countModules('left');
$showleft2 = $this->countModules('left2') && !$showleft;
$showleft3 = $this->countModules('left3') && !$showleft;
so if you have left , left2 and left3 will be hidden
The following user(s) said Thank You: enemy1
Please Log in to join the conversation.
Time to create page: 0.097 seconds