Dynamic Naviation Menus! Tired of editing tables my whole life.

Status
Not open for further replies.

Enigmabomb

New member
Feb 26, 2007
2,035
66
0
Than Franthithco
I'm cranking out content really FAST! I'm an awesome writer, but not so good with the coding. My background is C++, not PHP. Anyow, I feel like I Spend my whole life editing navigation tables. Everytime I add a new page, I have to change every existing page. the Problem gets worse and worse as the site gets bigger. at this point, I'd switch to a fucking cookie cutter blog if it means it would handle all the nav stuff for me. My current nightmare is my personal website Joshua Ziering's Blog TONS OF CONTENT, It gets the majority of my adsense clicks even though it's never gotten one second of promotion.

Here's what I want in pseduo code:
'm looking for a script I can use to dynamically generate a navigation menu. I want to be able to make one file and put the same script in all my pages to make a menu. Here's the pseudo code, does such a thing exist before I undertake writing this.

SeedFile.txt
FORMAT
URL LINKNAME CATEGORY TOP?
MyDomain.com/Vegetables.html, "Vegetables", Veggies, Top
Mydomain.com/Carrots.html, "Carrots", Veggies, Sub
Mydomain.com/Celery.html, "Celery", Veggies, Sub
Mydoman.com/Fruit.html, "Fruit", Fruit, Top
Mydomain.com/Apples.html, "Apples", Fruit, Sub
MyDomain.com/Oranges.html, "Oranges" Fruit, Sub

Pseduo Code
Read Seed File into A Matrix
Column 1 is titled URL
Column 2 is titled LinkName
Column 3 is titled Category
Column 4 is titled ToporSub (Could be a boolean value, but for clarity...)

Create HTML Table
First Row Reads "Navigation"
MatrixPosition=0

While MatrixPosition < MatrixSize, Read row.
If TopOrSub = Top
Make a Table Row, BGCOLOR = Blue
Else
insert into new table row <a href="$URL">$LinkName</a>
MatrixPosition++



The reason for the categories is that I want to be able to do some linking based off the seed file. For example, in my page about Celery I want to be able to put in apiece of code that links to all the other veggie pages.

Read Seed File
Make Table
MatrixPosition=0
Read Row
While Category = Veggies = True
Make new table row, insert <a href="$URL">$LinkName</a>



IIRC you can do php inclusion to the tune of <PHP File="File.php"> and it will put all the code from File.php in it's place. I desperately need something like that. this is getting out of control.

Thanks in advance, I'm loving this site. It's a great rescource. I can't believe I was trying to learn all this stuff by myself. Luckily someone got the SEO of this site correct, because I eventually found it. THANKFULLY!
 


Holy Crap. This is the best thing ever. Dotster even had it all ready to be installed for me, I didn't have to do anything but give it some basic info. I'm like about to wet myself over here. Adsense just became a WHOLE LOT easier for me. Im never going to write a line of HTML again.

Question for you guys playing with this

Blog address (URI):
If you want your blog homepage to be different than the directory you installed WordPress in, enter that address here.

So let's say I have a dir on a totally different server. myserver.com/Josh

Can I tell word press to use that, and it will populate all of it's files there?

How will I reference specific articles then? Will it understand to take myserver.com/php-id+=2223 and convert it to where it REALLY lives?

Thanks for heads up,

Josh
 
Status
Not open for further replies.