How to get component parameters?

前端 未结 8 1671
萌比男神i
萌比男神i 2020-12-24 11:35

I have a problem here and just cant solve it :-/

I am developing an Joomla component with backend. In the backend I set a parameter, the dashboardId, bu

8条回答
  •  时光说笑
    2020-12-24 12:35

    There's a more simple way. First import Joomla Component Helper:

    jimport('joomla.application.component.helper'); // not required in Joomla 3.x
    

    And then retrieve any attribute you want like this:

    $params = JComponentHelper::getParams('com_dashboard');
    $dashboardID = $params->get('dashboardID');
    

    Greetings.

提交回复
热议问题