Project

General

Profile

« Previous | Next » 

Revision 971

Added by Matthias over 15 years ago

Update show_menu2 to version 4.8 (ticket #712)

View differences:

README.en.txt
1
show_menu2, version 4.7
1
show_menu2, version 4.8
2 2
=======================
3 3
A code snippet for the Website Baker CMS software. It provides a complete 
4 4
replacement for the builtin menu functions. All menu data is retrieved using 
......
101 101
    correct flag values to pass for the $aOptions parameter.
102 102

  
103 103

  
104
Q:  How do I use a different class/picture/color/widget for each entry in a menu?
105
A:  Use the [page_id] format string in the $aItemOpen string. Create a unique 
106
    class or id for each menu item, then reference that item in your CSS or Javascript
107
    to do whatever you want.
108
    
109
    To add a unique class for each menu item (or similar):
110
    
111
        "<li><a href="[url]" target="[target]" class="[class] p[page_id]">[menu_title]</a>"
104 112

  
113
        ... creating menu items like ...
114
    
115
        <li><a href="/pages/foo/bar.php" target="_top" class="menu-top p45">Top Menu</a>
116

  
117
        Reference this in your CSS like:
118
        
119
        a.p45 { color: red; }
120
    
121
    To add a unique ID for each menu item (or similar):
122
    
123
        "<li><a id="p[page_id]" href="[url]" target="[target]" class="[class]">[menu_title]</a>"
124
    
125
        ... creating menu items like ...
126
    
127
        <li><a id="p45" href="/pages/foo/bar.php" target="_top" class="menu-top">Top Menu</a>
128

  
129
        Reference this in your CSS like:
130
        
131
        a#p45 { color: red; }
132
        
133
        Note that the ID can only be used if that menu is generated and displayed one time
134
        only on the page (because HTML ID's must be unique within a page). 
135
    
136

  
137

  
105 138
FUNCTION
106 139
========
107 140

  
......
140 173

  
141 174

  
142 175

  
143
OUTPUT
144
======
176
HTML OUTPUT
177
===========
145 178
The menu is output differently depending on what parameters have been 
146 179
supplied to the function, however in general the following classes are used 
147 180
for each menu. Note that items will have multiple classes when relevant.

Also available in: Unified diff