Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Substitutions in menu items structure
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 11/20/2003 at 10:17 PM
Substitutions in menu items structure


It is possible to reduce the size and make maintenance of menu items structure of Tigra Menu (all versions) easier by using javascript variable for repeating text. For example original structure is:

var MENU_ITEMS0 = [
['Description', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#description', {'tw':'_top'}],
['Features', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#features', {'tw':'_top'}],
['Compatibility List', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#compatibility', {'tw':'_top'}],
['Files', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#files', {'tw':'_top'}],
['Building menu hierarchy', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items', {'tw':'_top'},
['Item caption', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_caption', {'tw':'_top'}],
['Item link', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_link', {'tw':'_top'}],
['Submenu block items ', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_subitems', {'tw':'_top'}]
];

we can replace repeating {'tw':'_top'} by JavaScript varialbe containing this structure:

var tw = {'tw':'_top'};
var MENU_ITEMS0 = [
['Description', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#description', tw],
['Features', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#features', tw],
['Compatibility List', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#compatibility', tw],
['Files', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#files', tw],
['Building menu hierarchy', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items', tw,
['Item caption', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_caption', tw],
['Item link', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_link', tw],
['Submenu block items ', 'http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_subitems', tw]
];

or we can even go further:

var tw = {'tw':'_top'};
var dc = 'http://www.softcomplex.com/products/tigra_menu_gold/docs/';
var MENU_ITEMS0 = [
['Description', dc + '#description', tw],
['Features', dc + '#features', tw],
['Compatibility List', dc + '#compatibility', tw],
['Files', dc + '#files', tw],
['Building menu hierarchy', dc + '#items', tw,
['Item caption', dc + '#items_caption', tw],
['Item link', dc + '/#items_link', tw],
['Submenu block items ', dc + '#items_subitems', tw]
];

now note that having the same result we significantly reduced the size of the structure. And you can adjust multiple items at once editing only one variable. You can have as many different substitutions as you wish.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Tigra Menu
Product Demonstrations Live Demos:
Traditional Blue
White Steps
Inner HTML
All Together
Frames Targeting
Free Download Free Download
Free Download Menu Builders
Online Builder
Builder for Windows
Product Documentation Documentation:
Documenation Page
Change Log
Menus Comparison Table
Support Forum Support Forum
 
Tigra Menu PRO
Product Demonstrations Live Demos
Alignment & Multimenus
Unlimited Depth
Item sizing and positioning
Inner HTML
Frames, Targeting
Static Positioning
Free Download Menu Builders
Online Builder
Product Documentation Documentation
Documenation Page
Tigra Menu PRO FAQ
Change Log
Menus Comparison Table
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 
Product Page Tigra Menu GOLD
Functionality demos Functionality demos
Multiple
Cross-framed
Select-boxes
Effects
Design demos Design demos
Icons & arrows
Idea!
Hi there!
Matrix
MS Style
XP Style
Dots
3D-Buttons
Product Documentation Documentation
Documenation Page
Change Log
Menus Comparison Table
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004