Shopping Basket

 x 
Cart empty


Popular Items

Find Us Elsewhere

2Checkout.com is a worldwide leader in payment services

I am using the VM ModController module, but an empty space now shows up

Problem: I am using the VM Modcontroller module, module I want to control is being excluded from showing up on the individual product pages (as I want), but it leaves an empty module on every page now. I tried using your modules,php, but to no avail. I am using a JoomlArt template and tried adding your logic to their modules.php but still cannot get it right. Can you help me out with this, any ideas?

 

Answer: The reason you are seeing this behaviour is probably because your template includes something like the following:-

		
<?php if ($this->countModules('left')): ?>		
  <!-- BEGIN: LEFT COLUMN -->	
	<div id="ja-col1">	
		<jdoc:include type="modules" name="left" style="xhtml" />
		</div><br />
		<!-- END: LEFT COLUMN -->
		<?php endif; ?>



This code example comes from the ja-purity template by JoomlArt, but most templates use something very similar.

 

What is happening is that the template is checking if there are any modules assigned to the left column, if there are it creates a left hand column. The thing is that the ModController module works by suppressing the output of the module, it does not actually stop the module being from being assigned to the left column position. There is no way to do that dynamically within Joomla, it is fundamentally part of the way that Joomla works.

 

Really rather than trying to think of a way to stop the column being generated which would probably require some hacks to the core code of Joomla,  it is probably better to make the best of this, and simply use the space in some way, for example putting some additional information or links there. You can have as many instances of the ModController module as you want, you could have some extra information that is only published on the product pages if you wanted.

Alternatively you can try editing your template to only show the left column when it is not a product page:

 

       <?php if ($this->countModules('left') 
             && JRequest::getVar('option') != 'com_virtuemart' && 
JRequest::getVar('view') != 'productdetails' ): ?>
		<!-- BEGIN: LEFT COLUMN -->
		<div id="ja-col1">
			<jdoc:include type="modules" name="left" style="xhtml" />
		</div><br />
		<!-- END: LEFT COLUMN -->
		<?php endif; ?>

 

 In Virtuemart 1.1x you would use
<?php if ($this->countModules('left') 
    && JRequest::getVar('option') != 'com_virtuemart' && 
JRequest::getVar('page') != 'shop.browse' ): ?>