Creative Drop Down Menu Documentation |
|||
| Table of Contents > Handling Button Persistence | |||
In this help section you'll learn about button persistence.
The Creative Menu handles button persistence automatically. It reads the URL from the browser address bar and makes some comparisons in order to determine which button corresponds to the page. For example, if we have the following menu structure:
Home,http://www.extendstudio.com/
Products,http://www.extendstudio.com/Products/ All_Products/
Forum,http://www.extendstudio.com/Support/Forum/
and the URL in the browser address bar is:
http://www.extendstudio.com/Products/All_Products/
the Products button will be automatically selected.
This also works with relative paths. For example, if we have the following structure:
Home,home.html
Products,products.html
Forum,forum.html
and the URL in the browser address bar is:
http://www.my_web_site.com/products.html
the Products button will also be automatically selected.
However, using relative paths is only recommended for small websites that have all the pages in the root of the site. When you have the pages organized in multiple folders it is recommended to use absolute URLs. This way you can also use the "Update in all pages" feature that automatically updates your menu in all the pages after making changes in one page (this does not work with relative paths).
There are some cases where the automatic persistence system will not be enough. For example, you may have a page that does not have a corresponding menu button but you would like to highlight a button in the menu in order to point out the current website section.
In cases like these you can select a specific button by adding an URL parameter that represents the ID of the button. To do this you must first define IDs for your buttons in the menu structure. This can be done by simply typing the button id after the url and target, separated by a comma. A menu structure with IDs would look like this:
Home,home.php,_self,hom
Products,products.php,_self,prod
Forum,forum.php,_self,frm
So, "hom", "prod" and "frm" will be the IDs of the menu buttons. Now, in order to select one of the button we will have to add an URL parameter of the following form:
http://my_address/?{MenuName}_select={ID}
where {MenuName} represents the name of the menu and {ID} represents the ID of the button.
For example:
http://www.my_web_site.com/add_post.php?my_menu_select=frm
will select the Forum button in the menu called "my_menu".
|
|||