2

I've got a plugin that's a package with 4-5 sub-packages. When the package completes installation, I would like to direct the user automatically to my options page to configure the plugin. I've hunted around, and I don't see how to do that.

Any help would be appreciated.

1 Answer 1

2

You can use the postflight method in your install script for this, like so:

class Com_MyComponentInstallerScript
{
    protected $extension = 'com_mycomponent';

    public function postflight($type, $parent)
    {
        JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_config&view=component&component=' . $this->extension));
    }
}
1
  • The one thing that's required is that for this to work, you must specify false as the second argument to the JRoute::_() call. Otherwise the ampersands are encoded, breaking the redirect. Feb 6, 2017 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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