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

  • 'body' - load the menu in the body. It wil be shown at the top of the page (not sticky)
  • 'topfixed' - load the menu in the body. It wil be shown at the top of the page (sticky)
  • 'menu' - load the menu in the same place as the normal menu

'detectiontype'

When must your mobile menu be shown

  • 'resolution' - load the menu under a resolution value
  • 'phone' - load the menu only on the phone devices
  • 'tablet' - load the menu only on the phone and tablet devices

'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.

 

Fast and powerful creation, customizable and responsive.

Read More

Favorites extensions

logo maximenuck 110 logo pagebuilderck 110 logo slideshowck 110template creator ck large 449

Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline