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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, June 21, 2002 6:13 AM
To: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
www.tececo.com


Reply via email to