input; // Checking if loaded via index.php or component.php $tmpl = ($input->getCmd('tmpl') != '') ? '1' : ''; JFactory::getDocument()->addScriptDeclaration(' setmenutype = function(type) { var tmpl = ' . json_encode($tmpl) . '; if (tmpl) { window.parent.Joomla.submitbutton("item.setType", type); window.parent.jModalClose(); } else { window.location="index.php?option=com_menus&view=item&task=item.setType&layout=edit&type=" + type; } }; '); ?> 'slide1')); ?> types as $name => $list) : ?>