0

I want to show a component in the backend index page. I have tried using the following methods in the index.php file but it doesn't show.

<?php                                                                                       $doc = JFactory::getDocument();
$module = JModuleHelper::getModule('mod_hello_ajax_world',$title);
//get and update params
$params = new JRegistry;
$params->loadString($module->params);
$params->set('some_param_of_module',$some_value);
//render module
$renderer = $doc->loadRenderer('module');
$content = $renderer->render($module, array('params'=> $params));
print $content;                                                                                   ?>

Also tried this:

<jdoc:include type="module" name="hello_ajax_world"/>

But it doesn't work either.

My module has a client type administrator.

What am I doing wrong?

Thanks in advance.

1

To show a module on the administrator:

Goto Extensions -> Module Manager. Set Filter to Administrator. Now you can see which positions you can use. For example you could add a module to the cpanel position.

But your question also holds the word component, so I'm not sure if you mean a module or component.

If you just want to show a quickicon, see Add a quick icon in Joomla 3

  • You mean, my answer worked for you? If so, please mark it with the checkmark ;-) – COBIZ webdevelopment Mar 23 '15 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.