Setting up a Dynamic Root Structure Link Bar
Moderator: General Moderators
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
Setting up a Dynamic Root Structure Link Bar
What I mean is like what you can see on this site.
DevNetwork Forums-> Forum Index -> PHP- Code -> This post
i was wondering the best logical way to approach this with a simplair site then this. Say I have 5-6 pages, and each of those pages go on to a selection of 4 pages each. How can I have 1 top_bar include that would go:
Home -> Page 1 -> Selection 4.....
Setting up varabiles for each of these sections then making true if it is on that page that session? I'd like to know others opinions on approaching this problem.
DevNetwork Forums-> Forum Index -> PHP- Code -> This post
i was wondering the best logical way to approach this with a simplair site then this. Say I have 5-6 pages, and each of those pages go on to a selection of 4 pages each. How can I have 1 top_bar include that would go:
Home -> Page 1 -> Selection 4.....
Setting up varabiles for each of these sections then making true if it is on that page that session? I'd like to know others opinions on approaching this problem.
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
im not sure if i understand. Does anyone have any ideas on the best way to go about implimenting a navagation bar like this one into a site:

Ok, i dont mean to confuse, i just need a dynamic system for rooting where the enduser is, so he/she can move back through the steps it took to get there. Whats the best way to approach this problem when you already have a hard coded, smarty PHP system in production?

Ok, i dont mean to confuse, i just need a dynamic system for rooting where the enduser is, so he/she can move back through the steps it took to get there. Whats the best way to approach this problem when you already have a hard coded, smarty PHP system in production?
How about a cookie? Every time someone goes to a page, you modify the cookie to be updated with the page they are on. For example. If someone goes to your index.php page, set the cookie to "index.php". From there they click a link to admin.php. On that admin.php page, you modify the cookie to be "index.php|admin.php", and so on. Then you can parse the cookie and make that link structure you want.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
database.
table structure similar to:
pages table
pageid int(10) unsigned not null auto_increment,
parentid in(10) unsigned not null,
urlid int(10) unsigned not null
url table
urlid int(10) unsigned not null auto_increment,
url varchar(255) not null,
urltext varchar(100) not null
then use mysql's internal looping (if possible) to grab each of the parents until the parentid is 0..
table structure similar to:
pages table
pageid int(10) unsigned not null auto_increment,
parentid in(10) unsigned not null,
urlid int(10) unsigned not null
url table
urlid int(10) unsigned not null auto_increment,
url varchar(255) not null,
urltext varchar(100) not null
then use mysql's internal looping (if possible) to grab each of the parents until the parentid is 0..
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact:
- NewfieBilko
- Forum Contributor
- Posts: 189
- Joined: Sun Jun 06, 2004 6:45 pm
- Location: Newfoundland
- Contact: