Aitoc

Skip to Main Content »

Search Site

Category Navigation:

 

FlexMenuPHP Free Component

 

FlexMenuPHP Free Component

$0.00
Add Items to Cart

FlexMenu.NET Content:

FlexMenu.PHP features
Installation
Menu structure definition
Using menu component
Customizing menu appearance
Download

FlexMenu.NET features

FlexMenu Object - horizontal or vertical orientation of FlexMenu.
Hierarchical Highlighting - The parent items remain highlighted while the nested menu groups expand.
Written in PHP
Cross-Browser Support - Automatically detects and renders a tailored DHTML menu for Microsoft Internet Explorer 4 - 6, Netscape Navigator 4 - 7, Opera 5,6 and Mozilla/Gecko based browsers run on Windows, Mac and Linux.

Cost - it is totally FREE!!!

Installation

Download and extract FlexMenuPHP.zip file to your site’s root directory.

Menu structure definition

Menu structure is defined in XML file similar to the sample:
<?xml version="1.0" encoding="utf-8" ?>
XML file must be well formed. The root element is
. Menu items are described in elements.

Each element must contain caption attribute. Other attributes are optional. In link attribute you can define hyperlink source. In target attribute you can define the frame where the link is opened. elements can have child elements.

Using menu component

1.Copy files
Copy menuinc folder from product installation directory into your application's root directory.

2. Copy additional files
Place the following lines in a HEAD section of the page.

3. Place the FlexMenu object on page
Place following code on top of the page:
include "menuinc/menu.inc.php";

$menu = new FlexMenu("topmenu.xml", 130, 21, 130, 21, "Red", "Green", "Blue", "Yellow", 1, 1, 1, "http://yourdomain/yourdirectory/", 0); $output = $menu->Show();

4. Place $output variable in place where you want to display menu
< ?=$output?>

That’s all. Launch your browser and enjoy.

Customizing menu appearance

Fig.1 Vertical menu

You can customize almost all menu parameters. To get the menu like fig.1 you should place the following piece of code into your .php page.

include "menuinc/menu.inc.php";

$menu = new FlexMenu("topmenu.xml", 130, 21, 130, 21, "Red", "Green", "Blue", "Yellow", 1, 1, 1, "http://yourdomain/yourdirectory/", 1);

$output = $menu->Show();

In most cases you can use a short syntax like this:

$menu = new FlexMenu("topmenu.xml");

This code will create a horizontal menu with default values.
Full syntaxes:

$menu = new FlexMenu($XmlSource, $ItemWidth, $ItemHeight, $SubWidth, $SubHeight, $ItemBorderColor, $ItemShadowColor, $BackgroundON, $BackgroundOVER, $Border, $Shadow, $Direction, $RootDirectory, $Instance);

 Parameters  Descriptions
 ID  Menu Identifier
 Runat  Place where the menu component is run. Always equals "Server"
 XmlSource  XML file description menu structure
 ItemWidth  Menu top level item width  
 ItemHeight  Menu top level item height
 SubWidth  Menu subitem width
 SubHeight  Menu subitem height
 ItemBorderColor  Border color
 ItemShadowColor  Menu shadow color
 BackgroundON  Menu item is highlighted with color when the mouse pointer is on the item
 BackgroundOVER  Menu item is highlighted with color in the usual state
 Border  Border width. 0 — no border
 Shadow  Shadow width. 0 — no shadow
 Direction  Menu direction. 0 — horizontal, 1 — vertical


* Grey items are obligatory

You also can operate menu appearance by CSS:

DIV { font-family : Tahoma, Helvetica; }

.clsCMOn {
color: black;
font-size : 12px;
text-decoration : none;
padding: 2px 4px;
}
.clsCMOver {
color: black;
font-size : 12px;
text-decoration : none;
padding: 2px 4px;
}

You can describe common style for menu items text in DIV tag style sheet. CSS classes clsCMOn and clsCMOver describe menu item link appearance when a mouse pointer is on and over the menu item.

     

Write Your Own Review

You're reviewing: FlexMenuPHP Free Component

How do you rate this product?*
  1 star 2 stars 3 stars 4 stars 5 stars
Rating