How to check that module1 is being called in joomla 2.5?

I am trying to check if module1 is called on the default default page.

If module1 is called, I want to show the product description for this module. when I tried to add a description on the default page, it shows the description in all virtue mart product modules.

I am stuck at this stage of my project, where I cannot catch the call of module1 on the martial page.

how can i check this call to module1?

here is the code for the description:

// Product Description if (!empty($this->product->product_desc)) { ?> <div class="product-description"> <?php /** @todo Test if content plugins modify the product description */ ?> <span class="title"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE') ?></span> <?php echo $this->product->product_desc; ?> </div> <?php } 
+5
source share
2 answers

Go to ../modules/mod_virtuemart_product/TMPL/default.php

This file copies to create a new file by adding or removing code. And after going to the administrator, select or create a module. then select the layout on the right side of the screen of your newly created file.

it works.

+3
source

By default, joomla can check if a module exists in a specific position.

So, if you add your module to a position in which there are no other modules that you could use:

 <?php if ($this->countModules( 'user1' )) : ?> Module exist <?php endif; ?> 

You can check here for the full documentation.

+1
source

Source: https://habr.com/ru/post/1200807/


All Articles