Permalink
Browse files

Show usage of custom keys in menu entries

git-svn-id: http://svn.php.net/repository/pear/packages/HTML_Menu/trunk@149128 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 8b1e17c commit 0e2bd8b5a8271ad3aa6bf549a2e2d5e282ebb428 @sad-spirit sad-spirit committed Jan 18, 2004
Showing with 12 additions and 9 deletions.
  1. +4 −1 examples/data/menu.php
  2. +6 −6 examples/templates/sigma.html
  3. +2 −2 examples/templates/sigmatree.html
View
5 examples/data/menu.php
@@ -12,16 +12,19 @@
1 => array(
'title' => 'Menu item 1',
'url' => '/item1.php',
+ 'desc' => 'a special element',
'sub' => array(
- 11 => array('title' => 'Menu item 1.1', 'url' => '/item1.1.php'),
+ 11 => array('title' => 'Menu item 1.1', 'url' => '/item1.1.php', 'desc' => 'nothing special here'),
12 => array(
'title' => 'Menu item 1.2',
'url' => '/item1.2.php',
+ 'desc' => 'a very special element',
'sub' => array(
121 => array('title' => 'Menu item 1.2.1', 'url' => '/item1.2.1.php'),
122 => array(
'title' => 'Menu item 1.2.2',
'url' => '/item1.2.2.php',
+ 'desc' => 'a really very special element',
'sub' => array(
1221 => array('title' => 'Menu item 1.2.2.1', 'url' => '/item1.2.2.1.php'),
1222 => array('title' => 'Menu item 1.2.2.2', 'url' => '/item1.2.2.2.php')
View
12 examples/templates/sigma.html
@@ -71,33 +71,33 @@
<!-- BEGIN tree_entry_loop -->
<tr>
<!-- BEGIN tree_1_inactive -->
- <td><a href="{tree_url}">{tree_title}</a></td>
+ <td><a href="{tree_url}" title="{tree_desc}">{tree_title}</a></td>
<!-- END tree_1_inactive -->
<!-- BEGIN tree_1_active -->
<td><strong>{tree_title}</strong></td>
<!-- END tree_1_active -->
<!-- BEGIN tree_1_activepath -->
- <td><a href="{tree_url}"><strong>{tree_title}</strong></a></td>
+ <td><a href="{tree_url}" title="{tree_desc}"><strong>{tree_title}</strong></a></td>
<!-- END tree_1_activepath -->
<!-- BEGIN tree_2_inactive -->
- <td>&nbsp;&nbsp;<a href="{tree_url}" class="small">{tree_title}</a></td>
+ <td>&nbsp;&nbsp;<a href="{tree_url}" class="small" title="{tree_desc}">{tree_title}</a></td>
<!-- END tree_2_inactive -->
<!-- BEGIN tree_2_active -->
<td>&nbsp;&nbsp;<strong class="small">{tree_title}</strong></td>
<!-- END tree_2_active -->
<!-- BEGIN tree_2_activepath -->
- <td>&nbsp;&nbsp;<a href="{tree_url}" class="small"><strong>{tree_title}</strong></a></td>
+ <td>&nbsp;&nbsp;<a href="{tree_url}" class="small" title="{tree_desc}"><strong>{tree_title}</strong></a></td>
<!-- END tree_2_activepath -->
<!-- BEGIN tree_inactive -->
- <td><!-- BEGIN tree_inactive_indent -->&nbsp;&nbsp;&nbsp;&nbsp;<!-- END tree_inactive_indent --><a href="{tree_url}" class="smaller">&bull; {tree_title}</a></td>
+ <td><!-- BEGIN tree_inactive_indent -->&nbsp;&nbsp;&nbsp;&nbsp;<!-- END tree_inactive_indent --><a href="{tree_url}" class="smaller" title="{tree_desc}">&bull; {tree_title}</a></td>
<!-- END tree_inactive -->
<!-- BEGIN tree_active -->
<td><!-- BEGIN tree_active_indent -->&nbsp;&nbsp;&nbsp;&nbsp;<!-- END tree_active_indent --><strong class="smaller">&bull; {tree_title}</strong></td>
<!-- END tree_active -->
<!-- BEGIN tree_activepath -->
- <td><!-- BEGIN tree_activepath_indent -->&nbsp;&nbsp;&nbsp;&nbsp;<!-- END tree_activepath_indent --><a href="{tree_url}" class="smaller"><strong>&bull; {tree_title}</strong></a></td>
+ <td><!-- BEGIN tree_activepath_indent -->&nbsp;&nbsp;&nbsp;&nbsp;<!-- END tree_activepath_indent --><a href="{tree_url}" class="smaller" title="{tree_desc}"><strong>&bull; {tree_title}</strong></a></td>
<!-- END tree_activepath -->
</tr>
<!-- END tree_entry_loop -->
View
4 examples/templates/sigmatree.html
@@ -76,10 +76,10 @@
<strong class="red">{tree_title}</strong>
<!-- END tree_active -->
<!-- BEGIN tree_inactive -->
- <a href="{tree_url}">{tree_title}</a>
+ <a href="{tree_url}" title="{tree_desc}">{tree_title}</a>
<!-- END tree_inactive -->
<!-- BEGIN tree_activepath -->
- <a href="{tree_url}"><em>{tree_title}</em></a>
+ <a href="{tree_url}" title="{tree_desc}"><em>{tree_title}</em></a>
<!-- END tree_activepath -->
<!-- BEGIN tree_entry_close -->
</li>

0 comments on commit 0e2bd8b

Please sign in to comment.