Fatal error: Class 'JParameter' not found in template/theme/index.php on line xxx

Tushar Gohel picture Tushar Gohel · Oct 7, 2013 · Viewed 13.8k times · Source

i upgrade template 2.5 to 3.0, template upgrade but come the following error.

Fatal error: Class 'JParameter' not found in template/theme/index.php on line xxx

Answer

Lodder picture Lodder · Oct 7, 2013

JParameter was removed in Joomla 3.0 and now either JForm or in most cases JRegistry should be used.

So use the following code, and change to suit your own needs

$jparams = new JRegistry();
$variable = $jparams->get('param_name');