Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

i am trying to check whether module1 is called in virtue mart default page.

if module1 is being called i want to show product description for that module. when i tried to add description in default page it shows description in all virtue mart products modules.

i am stuck at this stage of my project where i am not able to catch module1 call in virtue mart page.

how can i check for this module1 call?

here is code for 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
}
like image 595
chetan patel Avatar asked Oct 01 '22 01:10

chetan patel


2 Answers

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

This file copy to create new file in this you add or remove code. And after go to administrator select or create module. then select layout drop down at right side of screen your new created file.

it's working.

like image 173
HK_Khunt Avatar answered Oct 03 '22 00:10

HK_Khunt


By default joomla could check if a module exist in a specific position.

So if you add your module in a position that doesn't have any other modules you could use:

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

You could check here the complete documentation

like image 29
emmanuel Avatar answered Oct 03 '22 02:10

emmanuel