How to create the "Extreme" sample menu using FlexiMenusJS Dynamic version

Summary

Tutorial files

You can download all the files needed to complete this tutorial and create the Xtreme menu by clicking on the Download button bellow.

Inside the archive you will a MySQL database, a PHP file that has a recordset for getting all the data from the database and a HTML document that holds the custom html used for creating the menu.

Please keep in mind that these files are not for commercial usage.

In this tutorial we will create a dynamic version of the menu from the Xtreme sample page. You can see bellow a copy of that menu that we want to reproduce by the end of this tutorial. By creating this menu you will learn how to use two very important features of our extension: how to add icons on buttons and how to create a button using custom HTML.

Here's a list of all the steps needed to get to the final result:

* You can jump over these steps by downloading the tutorial files.

Extreme menu





Creating the database table that will hold the element data

If you don't have a database created already, please create one know (or, you can use the one from the tutorial package that's avaialable for download).

After you set up the database create a new table. The table will contain these columns:

Once the table is created, all you have to do now is to populate it with menu elements.

Database records example

Bugatti button from the main menu:

  • ID : 2
  • parentID : 0
  • type : button
  • label : Bugatti
  • link : null
  • target : _self
  • icon : ./pics/bugatti.png
  • param_img : null
  • param_name : null
  • param_desc : null

First separator from the Bugatti submenu:

  • ID : 14
  • parentID : 2
  • type : separator
  • label : sep21
  • link : null
  • target : _self
  • icon : null
  • param_img : null
  • param_name : null
  • param_desc : null

Type 12-2 level 3 menu (custom HTML):

  • ID : 40
  • parentID : 15
  • type : button
  • label : null
  • link : null
  • target : _self
  • icon : null
  • param_img : <img src="./pics/bugatti-type-12-2.jpg" />
  • param_name : Bugatti Type 12-2
  • param_desc : Lorem ipsum dolor sit amet,<br /> consectetur adipisicing elit, <br /> sed do eiusmod tempor...

Back to top

Creating the PHP recordset

The data from database will get to our menu by the use of Dreamweaver recordsets. Before creating a recordset you need to create a database connection. (A PHP page with a recordset and connection already created can be downloaded from the "Tutorial files" area, above).

A new database connection can be created by clicking on the plus sign in the "Databases" panel. Fill in the form with the requiered connection settings and test the connection to make sure it works

After the database is created, you can now create the recordset. Follow these steps in order to create it:

Recordset configuration

Recordset configuration

Back to top

Inserting the menu in the page and configuring the dynamic parameters

We can now insert a FlexiMenusJS on the page. Open the "Insert" panel from "Window->Insert" and click on the "Insert Dynamic Menu".

The visual aspects of the design of the menu will not be covered in this tutorial. Just select the Darkblue skin and set the color-scheme to "red" for now.

Once you've selected the skin and size of the menu, open the configuration tab. The dynamic parameters reside on the left part of the interface. I will explain what each of them does.

Dynamic parameters
  • “Select recordset”: choose the recordset that will be used to generate to menu structure

  • “Select id column”: indicates the column that holds the unique id of each skin element

  • “Select parent column”: indicates the column that has the ID number of the parent of each skin element

  • “Select element type column”: indicates the column that will be used to define the type of each skin element

  • “Label”: insert the column that holds the labels of the buttons and headers

  • “Link”: insert the column that holds the links for the buttons

  • “Link target”: insert the column that holds the target of the URL’s

Back to top

Creating menu's first level

The first level of the "Extreme" menu contains 5 buttons with an icon on each one. While creating this level you will learn how to add icons to your buttons.

Let's move our attention to the right part of the interface now.

The button configuration should look something like this:

Level 1 configuration

Level 1 configuration

Back to top

Creating menu's second level

The second level of the menu contains 3 or 4 buttons that make the connection with the last level. Also, between each two buttons a separator is inserted.

There isn't much you can do here besides handling the visual aspects. The buttons and the separators are created automatically from the database.

You just need to make sure that the button content type on "Level 2" is set to "label".


Back to top

Creating menu's third level (Custom HTML buttons)

Finally we made it to the third level of the menu, the one that will use custom HTML buttons.

Level 3 configuration

Level 3 configuration

Back to top