How to hide an empty position? - Joomla! Forum - community, help and support
my website www.pilotdan1985.com. trying edit template show "myright" position if there content there. instance: http://www.pilotdan1985.com/index.php/command-help has facebook feed shown there great. however, want more room on forum page http://www.pilotdan1985.com/index.php/2 ... 5-18-21-59 have disabled facebook thing showing there. position blank on page still enabled. want gone there no module displayed.
my template file:
thank in advance help.
my template file:
code: select all
<?php
// no direct access
defined( '_jexec' ) or die( 'restricted access' );
$sitename = $this->params->get('sitename');
$logo = $this->params->get('logo',$this->baseurl .'/templates/'.$this->template.'/images/logo.png');
$spotlight_image = $this->params->get('spotlight_image',$this->baseurl .'/templates/'.$this->template.'/images/spotlight.jpg');
class tjc {
function isfrontpage(){
return (jrequest::getcmd('option')=='com_content' && !jrequest::getint('id'));
}
}
$tj = new tjc($this);
?>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<!--
design themesjoomla.com
http://www.themesjoomla.com
released free under creative commons attribution 2.5 license
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template_css.css" type="text/css" />
</head>
<body>
<div id="top">
<div id="top-cover">
<div id="logo"><a href="<?php echo $this->baseurl ?>" title="<?php echo $sitename; ?>"><img src="<?php echo $logo ?>" border="0" alt="<?php echo $sitename; ?>" /></a></div>
<div id="topmenu">
<jdoc:include type="modules" name="mymainmenu" style="xhtmlxtd" />
</div>
</div>
</div>
<div class="container">
<div id="contentarea">
<?php if(!$tj->isfrontpage()) { ?>
<div id="content">
<jdoc:include type="message" />
<jdoc:include type="component" style="xhtml"/>
</div>
<div id="right">
<jdoc:include type="modules" name="myright" style="xhtml" />
</div>
<?php } else { ?>
<div class="spotlight">
<?php if($this->params->get('show_spotlight') == 1) { ?>
<?php if($this->params->get('spotlight_image_link')) { ?>
<a href="<?php echo $this->params->get('spotlight_image_link'); ?>">
<?}?>
<img src="<?php echo $spotlight_image; ?>" border="0" alt=" " />
<?php if($this->params->get('spotlight_image_link')) { ?>
</a>
<?}?>
<?php } ?>
<jdoc:include type="modules" name="myspotlight" style="xhtml" />
</div>
<?php } ?>
</div>
<div id="bottom">
<div id="user1">
<jdoc:include type="modules" name="myuser1" style="xhtml" />
</div>
<div id="user2">
<jdoc:include type="modules" name="myuser2" style="xhtml" />
</div>
<div id="user3">
<jdoc:include type="modules" name="myuser3" style="xhtml" />
</div>
</div>
<div id="footer">
<jdoc:include type="modules" name="mybusiness-footer" style="xhtml" />
<p>copyright © <?php echo $sitename; ?>. rights reserved. <?php echo jtext::_('powered by') ?> <a href="http://www.joomla.org">joomla!</a>. <?php echo jtext::_('valid') ?> <a href="http://validator.w3.org/check/referer">xhtml</a> <?php echo jtext::_('and') ?> <a href="http://jigsaw.w3.org/css-validator/check/referer">css</a>.
<!-- can not remove (or unreadable) links without permission. removing link , template sponsor please visit themesjoomla.com or contact e-mail (webmaster@themesjoomla.com) if don't want link themesjoomla.com, can pay link removal donation. allow use template link free on 1 domain name. also, kindly send me site's url can include on list of verified users . please read license.txt -->
<br />
<a href="http://www.themesjoomla.com" rel="follow">joomla themes</a> <a rel="follow" href="http://www.themesjoomla.com"><strong>themesjoomla.com</strong></a></p>
</div>
</div>
<jdoc:include type="modules" name="debug" />
</body>
</html>thank in advance help.
replace
<div id="right">
<jdoc:include type="modules" name="myright" style="xhtml" />
</div>
with
<?php if ($this->countmodules('myright')): ?>
<div id="right">
<jdoc:include type="modules" name="myright" style="xhtml" />
</div>
<?php endif; ?>
and if width not specified content area in css file should work fine.
<div id="right">
<jdoc:include type="modules" name="myright" style="xhtml" />
</div>
with
<?php if ($this->countmodules('myright')): ?>
<div id="right">
<jdoc:include type="modules" name="myright" style="xhtml" />
</div>
<?php endif; ?>
and if width not specified content area in css file should work fine.
Comments
Post a Comment