I am developing a custom button to integrate with an external commercial publishing software. My button base works and some how the iframe is called onto my test web site where the external App and Joomla are both installed.

To be specific my button has a link, which is fired in an iFrame:

$link = 'http://somehost.com/application_dir/widgets/selection?';

$button = new JObject();
$button->set('modal', true);
$button->set('class', 'btn');
$button->set('link', $link);
$button->set('text', JText::_('PLG_CANDAMFOTOWEB8_SIGEBUTTONTEXT'));
$button->set('name', 'wand');

$button->set('options', "{handler: 'iframe', size: {x: 600, y: ".$height_modal."}}");
$button->onclick = 'CandamFW8BtnClick(\''.$name.'\'); return false;';

My issue here is that in the back-end, joomla Editor adds the JURI::base() to the link, so that the iframe address becomes:


Is there an easy way to override the href generated once the button is displayed (an afterDisplay event may be) right this code sits in the onDisplay() event...

I thought of using a php proxy which in turn would call an external iframe, but it does not help, since JURI::base( still returns the site/administrator path and my php proxy has to sit in the site/plugins/pluginname/ directory.

Any idea what could work?

1 Answer 1


I finally gave up on this method and replaced the $link on the Joomla custom editor Button with an empty reference "#", and managed the iframe display outside in the Javascript code attached to the $button->onclick event.

By using a Bootstrap popup window in which I load the external Iframe, i solved the issue. This just required to change the approach to the issue. By loading the external Iframe in the Javascript i am free from the Joomla Framework default base reference introduced in the Editor button links.

Your Answer

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

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