7 replies [Last post]
t-bone_two
t-bone_two's picture
Offline
Enthusiast
Los Angeles
Last seen: 13 weeks 5 days ago
Los Angeles
Timezone: GMT-7
Joined: 2009-09-26
Posts: 209
Points: 268

I posted this in off topic.

I have somewhat of a troublesome client building a large site with an extremely comprehensive menu on the side of the page. It is a standard unordered list.

The menu appears on every last page. And the guy keeps wanting to re-order it. I am finding type-o's etc. I am not happy with the find and replace method via Dreamweaver because I find it leaves artifacts and unintentional line breaks and such.

So I am looking for a piece of code. Such as what would be used to call an image from a different server to apply to the menu. So I generate the menu one time instead of having it on every last page.

Is this possible. If so . . . How. Thanks!

Tags:
CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 23 weeks 6 days ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2636
Points: 1554

PHP

PHP

Deuce
Deuce's picture
Offline
Guru
Las Vegas, NV
Last seen: 1 year 31 weeks ago
Las Vegas, NV
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4422
Points: 1841

convert all pages to php and

convert all pages to php and create a file called navigation.php
Put only the unordered list in that file. No doctype, or body tags or anything. Just the navigation data.
Then, in all of your pages replace the navigation with

<?php include('navigation.php'); ?>

Now you only have one file to change and it edits all of them.
This works great for areas like the footer and including css and javascript files and such as well.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

t-bone_two
t-bone_two's picture
Offline
Enthusiast
Los Angeles
Last seen: 13 weeks 5 days ago
Los Angeles
Timezone: GMT-7
Joined: 2009-09-26
Posts: 209
Points: 268

Wow!

Thanks for the information.

I am really excited about this.

I am having trouble styling the content though.

Any special way to handle styles?

t-bone_two
t-bone_two's picture
Offline
Enthusiast
Los Angeles
Last seen: 13 weeks 5 days ago
Los Angeles
Timezone: GMT-7
Joined: 2009-09-26
Posts: 209
Points: 268

Wow!

Thanks for the information.

I am really excited about this.

I am having trouble styling the content though.

Any special way to handle styles?

Deuce
Deuce's picture
Offline
Guru
Las Vegas, NV
Last seen: 1 year 31 weeks ago
Las Vegas, NV
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4422
Points: 1841

No. Once the site renders,

No. Once the site renders, it's the exact same as if it's hardcoded.
After you load it up on a server, view the source. It should look like you never changed a thing.
If it doesn't then you messed something up Smile

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 1 week 20 hours ago
London
Joined: 2004-06-06
Posts: 15667
Points: 2805

Once you have it sorted SACK

Once you have it sorted SACK the client Angry

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

t-bone_two
t-bone_two's picture
Offline
Enthusiast
Los Angeles
Last seen: 13 weeks 5 days ago
Los Angeles
Timezone: GMT-7
Joined: 2009-09-26
Posts: 209
Points: 268

True

He has deff. been moved to my panic list. Not that I am in a panic over the contract. But I will have to be in one to take another contract.

It's all relative. Some are diamonds some are duds. Some are diamonds and duds. Some pay diamonds in order to be duds . . .