With these instructions, the hotelrsv.js library will always load on all pages of your Joomla site. Now you can follow the
installation guide for the buttons or read the instructions below to learn how to install in Joomla menus.
The steps are the following ones:
Login into Joomla
Click on Administrator (left column of the main page)
Go to Menus->Menu Manager on the backend.
Find the corresponding menu (for home page menu is “Main Menu”) and press “Menu Items”
Find the corresponding menu name that you want to be the one associated to the widget, let’s take for example “Reserve”
On the right of the table copy the corresponding Id (in the case of “Reserve” it’s 41) under the column ItemID.
1.- Connect through ftp to your joomla 1.5 server
2.-
Locate the folder of the menu module, which usually from the joomla
root installation folder is under JoomlaRoot/modules/mod_mainmenu/tmpl
3.- Download the file default.php
4.-
Open it with any text editor, and locate the line with “if
(isset($path) && $node->attributes(‘id’) == $path[0]) {“
5.- Just above it paste the following lines of codeCode Snippet Menu Item.
- if(($node->name() == 'li') && ($node->attributes('id') == 41)) {
- if($node->attributes('class')) {
- $node->addAttribute('class', 'rsv-app-launcher '.$node->attributes('class'));
- }
- }
6.- Replace the 41 with the id that you found in the previous section
7.- The final outcome should like the following:
- ...
- if(($node->name() == 'li') && ($id= $node->attributes('id'))) {
- if($node->attributes('class')) {
- $node->addAttribute('class', $node->attributes('class').' item'.$id);
- } else{
- $node->addAttribute('class', 'item'.$id);
- }
- }
-
- if(($node->name() == 'li') && ($node->attributes('id') == 41)) {
- if($node->attributes('class')) {
- $node->addAttribute('class', 'rsv-app-launcher '.$node->attributes('class'));
- }
- }
- if(isset($path) && $node->attributes('id') == $path[0]) {
- $node->addAttribute('id', 'current');
- } else{
- $node->removeAttribute('id');
- }
- ...
8.- Save the file index.php
9.- Upload it in the same path from where it was downloaded
10.- Close ftp
Since now on in each menu we will have the class applied to the menu voice.