শনিবার, ৪ এপ্রিল, ২০০৯

Advanced Joomla Development: Create Custom parameter group for module

There is three types group in joomla xml module parameter:
  1. params
  2. Advsnce
  3. Legacy
These are fixed .We cannot create any other custom parameter Group. But I myself find a way to create custom parameter group. These are in the following:

  1. at first go to administrator\components\com_modules folder then open admin.modules.html.php file
  2. in this file go to line 437 Where is .There you can see $p = $params; in line 442 .after this line put this following code:
for($i=0;$i<10;$i++)>
if ($p->getNumParams('a'.$i)) {

echo $pane->startPanel(JText :: _('a'.$i.' Parameters'), "a".$i."-page");

if($params = $p->render('params', 'a'.$i)) :
echo $params;
else :
echo "
".JText::_('There are no parameters for this item')."
";
endif;
echo $pane->endPanel();
}
}
Now in your module XML file put the following code:

<params group="a1">
<param type="text" name="a1" value="Some text" />
<param type="text" name="a1" value="Some text" />
<params />
<params group="a2">
<param type="text" name="a2" value="Some text" />
<param type="text" name="a2" value="Some text" />
<params />

Example Image:



কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন