HTML::Menu_File proposal
| From: | Aaron S. Hawley | Date: | Fri, 27 Jul 2001 13:16:00 +0000 |
| Subject: | HTML::Menu_File proposal | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1091@lists.php.net to get a copy of this message | ||
hey,
there is a HTML::Menu_Browser class that will create a "menu" array based
on the directory structure.
what are thoughts on a class that would generate a "menu" array
from a file which defines the order, title, and url of pages on the site?
a format of the file would be:
a 3 column flat-file, delimited by anything (but defaults to tabs), with
each row having a number, a title, and a url, in that order.
for example:
0 Home /
1 Download /download.php
2 About /about.php
2-1 Contact /contact.php
2 -2 Philosophy /philosophy.php
a hyphen in the number would allow for definining the
multi-dimensionalness [new wurd] of the menu. regular expressions would
handle a tolerable amount of bad syntax (improper or trailing whitespace)
also i think it would be helpful to have it read other types of files.
like HTML files, with tables:
<table>
<tr>
<td>0</td>
<td>Home</td>
<td>/</td>
</tr>
<tr>
<td>1</td>
<td>Download</td>
<td>/dowload.php</td>
</tr>
<tr>
<td>2</td>
<td>About</td>
<td>/about.php</td>
</tr>
<tr>
<td>2-1</td>
<td>Contact</td>
<td>/contact.php</td>
</tr>
<tr>
<td>2-2</td>
<td>Philosophy</td>
<td>/dowload.php</td>
</tr>
--
__________________________________________
PINE 4.33 Mailer - www.washington.edu/pine