Re:Menu buttons and Gray Box
Saturday, 17 October 2009 08:39
For example, it is possible if it adds to your template(index.php) as follows.
<?php
$mainframe = & JFactory::getApplication();
$js_root = JURI::base(true). '/plugins/content/greybox/';
$headtag = array();
$headtag[] = '<script type="text/javascript">var GB_ROOT_DIR = "'. $js_root. '"</script>';
$headtag[] = '<script type="text/javascript" src="'. $js_root. 'AJS.js"></script>';
$headtag[] = '<script type="text/javascript" src="'. $js_root. 'AJS_fx.js"></script>';
$headtag[] = '<script type="text/javascript" src="'. $js_root. 'gb_scripts.js"></script>';
$headtag[] = '<link href="'. $js_root. 'gb_styles.css" rel="stylesheet" type="text/css" />';
$mainframe->addCustomHeadTag( implode( "\n", $headtag ) );
JHTML::_( 'behavior.mootools' );
$addjs = "
window.addEvent('domready', function(){
$$('li.your_menu_class a').each(function(e){
e.setProperty('rel','gb_page_fs[]');
});
});";
$document = & JFactory::getDocument();
$document->addScriptDeclaration($addjs);
?>and Output GreyBox.js in Plugin Parameters to No.
li.your_menu_class a
This part is different according to your environment.