To insert joomla module in component , you just need to put this code block in component template file.
Here "moduleposition" is the module position which you will have defined from Joomla Admin Module manager section. Then this will list all modules of that position.
<?php
$modules =& JModuleHelper::getModules('moduleposition');
if(count($modules) > 0){
foreach ($modules as $module)
{
echo JModuleHelper::renderModule($module);
}
}
?>
This is my personal blog where I can share my thoughts on various Web Development Technologies. I have above 6 yrs experience in web development in various language like PHP, Java, .Net. I also worked lots on various open sources like Joomla, Drupal, Wordpress, Os Commerce, Zencart etc.
Friday, August 27, 2010
Monday, August 23, 2010
How to remove mootools.js and caption.js from Joomla 1.5
In Joomla 1.5 template file index.php, you just need to put this below code to remove default Joomla JS from page header.
Path : /templates/themename/index.php
<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff); }
?>
<jdoc:include type="head" />
Replace below 2 lines with above code block.
<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?>
This above code block will remove following lines from page:
Path : /templates/themename/index.php
<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff); }
?>
<jdoc:include type="head" />
Replace below 2 lines with above code block.
<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?>
This above code block will remove following lines from page:
/joomla/media/system/js/mootools.js
/joomla/media/system/js/caption.js
Subscribe to:
Posts (Atom)