RE: [PHP] Nested Menu Help

From: Date: Sat, 22 Jun 2002 16:44:01 +0000
Subject: RE: [PHP] Nested Menu Help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103399@lists.php.net to get a copy of this message
I found a way of doing this in order to show the “home” button when browsing the site, but not when seeing the home page. What I do, is to set two menus like this: If ($browse == ‘yes’) { <a href=”index.php”>home</a> } <a href=”page1.php?browse=yes”>page 1</a> <a href=”page2.php?browse=yes ”>page 2</a> <a href=”page3.php?browse=yes ”>page 3</a> Notice how the links to other pages have the browse=yes set. You could do something like this by building two menus (A and B) so PHP will read something like browse=a or browse=b and fetch the right buttons from the DB using different queries. I know there must be an easier way, but so far, this is what I came with which suites my needs very well. -----Original Message----- From: webmaster@tececo.com [mailto:webmaster@tececo.com] Sent: Friday, June 21, 2002 6:13 AM To: php-general@lists.php.net Subject: [PHP] Nested Menu Help When I am in page A (or one of it's children) I wish to show it's one level of children like so: Page A Child 1 Child 2 etc... Page B When I am in page B (or one of it's children) I wish to show it's one level of children like so: Page A Page B Child 1 Child 2 etc... Do you get the picture? I have a db with link url, id, parent id and title does any one know of a simple function or something to do this for one level? I have tried and sort of failed 3 times. And before I keep trying I thought I would ask this group JJ Harrison webmaster@tececo.com www.tececo.com

« previous php.general (#103399) next »