Imprimer

You can use Mobile Menu CK in any PHP file in your system. There are 2 PHP functions that you can use to load the menu.

Note that the plugin Mobile Menu CK must be enabled.

Load the menu in a standard way

This method will call all the Javascript and CSS and put them in the head of the page using the standard Joomla API.

loadMobileMenuCK($selector, $options);

Load the menu inline

This method will call all the Javascript and CSS and write them exactly where you put the PHP code.

loadMobileMenuCKInline($selector, $options);

 

$selector : (required) this is a CSS selector string that tells the system where to find the menu. It can points to the menu root (by default a <ul> tag), or to a parent that contains the menu root.

$options : (optional) this is an array of options.

 

Example of a menu with parameters

$options = array(
            'mobilemenutext' => 'Menu'
            ,'container' => 'body'
            ,'detectiontype' => 'resolution'
            ,'resolution' => '800'
        );
loadMobileMenuCK('.navigation', $options);

'.navigation' is the CSS selector of the parent tag that contains the menu.

 

List of Parameters (sample)

'mobilemenutext'

This is the text that will be used in the menu bar. Use JText::_('YOUR_STRING') to have a multilanguage text.

'container'

Determines where your mobile menu will take place

'detectiontype'

When must your mobile menu be shown

'resolution'

Value of the screen resolution under which the menu will be active. Only if 'detectiontype' is on 'resolution'

 

For a complete list of parameters, see the Javascript section.