Guest
17 Aug 2012 04:29

When I try to use Cobalt API, I get the following error:

Fatal error: Call to undefined method JAdministrator::getParams() in [...]\components\com_cobalt\api.php on line 68

Commenting the line allows the API to work.

Maybe you meant $app->getProperties(); instead of $app->getParams(); ?

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
18 Aug 2012 09:27

$app->getProperties(); returns list of class properties. I meant to get params of the menu element.

late I use it like this

appParams->get('show_page_heading', 0) && $this->appParams->get('page_heading', '')) : ?>
<h1 class="title">

    <?php echo $this->escape($this->appParams->get('page_heading')); ?>

</h1>

And $app->getParams(); in the records view also. If you see records list in Joomla it means this poece of code is called ok.

When do you use this API? On before route or at what point of Joomla initialisation?

Powered by Cobalt