getUI(); // add option to the navigation menu $navbar->addOption('Link Controls', $module, $action); // space between theme elements $theme->breakContent(); // create a panel $panel = new MPanel('pnlName','Link Controls'); // some link examples $link = new MLink('ilnkName', 'Label of MLink', MIOLO::getCurrentURL(), 'Text for the MLink'); // adding a event to link $link->setOnClick("javascript:alert('Outch! You clicked me... ;-)');"); $imgLink = new MImageLink('ilnkName1', 'Label of MImagelink', MIOLO::getCurrentURL(), $ui->getImage('', 'button_edit.png') ); $imgLinkLabel = new MImageLinkLabel('ilnkName2', 'Label of MImagelinklabel', MIOLO::getCurrentURL(), $ui->getImage('', 'button_edit.png') ); $linkWindow = new MOpenWindow('lnkWindow','Open Google at new window',"http://www.google.com"); $controls = array( new MLabel("MLink: "), $link, new MSeparator(), new MLabel("MImageLink: "), $imgLink, new MSeparator(), new MLabel("MImageLinkLabel: "), $imgLinkLabel, new MSeparator(), new MLabel("MOpenWindow: "), $linkWindow, new MSeparator(), ); // add controls to the panel $panel->addControl($controls, '', 'left'); // put the panel in the theme $theme->insertContent($panel); // create a link to view the source of this file $src = new ViewSource(__FILE__); $theme->appendContent($src); ?>