[Bio] / WebApplication / WebMenu.pm Repository:
ViewVC logotype

Diff of /WebApplication/WebMenu.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Thu Jan 11 16:45:32 2007 UTC revision 1.2, Wed Mar 14 20:19:03 2007 UTC
# Line 1  Line 1 
1  package WebMenu;  package WebMenu;
2    
3    # WebMenu - manage menu for the WeApplication framework
4    
5    # $Id$
6    
7  use strict;  use strict;
8  use warnings;  use warnings;
9    
# Line 32  Line 36 
36    
37  =head1 DESCRIPTION  =head1 DESCRIPTION
38    
39  The WebMenu module defines a mechanism to build a menu structure by defining categories (top level menu entries) and optional links, as well as sub entries for each of the categories (consisting of a entry name, an url and an optional browser target.  The WebMenu module defines a mechanism to build a menu structure by defining
40    categories (top level menu entries) and optional links, as well as sub entries
41  The html output of the menu consists of an unordered list of lists, ie. a two level hierarchy of html links (<a href> tags) embedded in <ul> tags representing categories and their entries.  for each of the categories (consisting of a entry name, an url and an optional
42    browser target.
43    
44    The html output of the menu consists of an unordered list of lists, ie. a two
45    level hierarchy of html links (<a href> tags) embedded in <ul> tags representing
46    categories and their entries.
47    
48  =head1 METHODS  =head1 METHODS
49    
# Line 82  Line 91 
91    
92  =item * B<home> (I<url>)  =item * B<home> (I<url>)
93    
94  Returns the link of the home page. If the optional parameter I<url> is given, home will be set.  Returns the link of the home page. If the optional parameter I<url> is given,
95  I<url> may be undef.  home will be set. I<url> may be undef.
96    
97  =cut  =cut
98    
# Line 100  Line 109 
109    
110  =item * B<add_category> (I<category>, I<url>, I<target>)  =item * B<add_category> (I<category>, I<url>, I<target>)
111    
112  Adds a category to the menu. I<category> is mandatory and expects the name of the menu category. I<url> is optional and will add a link to the category name in the menu. I<target> is optional and defines a href target for that link.  Adds a category to the menu. I<category> is mandatory and expects the name of the
113    menu category. I<url> is optional and will add a link to the category name in the menu.
114    I<target> is optional and defines a href target for that link.
115    
116  =cut  =cut
117    
# Line 135  Line 146 
146    
147  =item * B<delete_category> (I<category>)  =item * B<delete_category> (I<category>)
148    
149  Deletes a category from the menu. I<category> is mandatory and expects the name of the menu category.  Deletes a category from the menu. I<category> is mandatory and expects the
150  If the category does not exist a warning is printed.  name of the menu category. If the category does not exist a warning is printed.
151    
152  =cut  =cut
153    
# Line 178  Line 189 
189    
190  =item * B<add_entry> (I<category>, I<entry>, I<url>)  =item * B<add_entry> (I<category>, I<entry>, I<url>)
191    
192  Adds an entry and link to a existing category of the menu. I<category>, I<entry> and I<url> are mandatory. I<category> expects the name of the menu category. I<entry> can be any string, I<url> expects a url.  Adds an entry and link to a existing category of the menu. I<category>, I<entry>
193  I<target> is optional and defines a href target for that link.  and I<url> are mandatory. I<category> expects the name of the menu category.
194    I<entry> can be any string, I<url> expects a url. I<target> is optional and
195    defines a href target for that link.
196    
197  =cut  =cut
198    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3