homepage Welcome to WebmasterWorld Guest from 54.167.177.180
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
tired of changing every page
jbryant

5+ Year Member



 
Msg#: 9988 posted 1:25 pm on Apr 2, 2005 (gmt 0)

I feel kinda dumb....but here it ges anyway.

I have designed a website which, to my surprise and delight, has been accepted well and become fairly popular.

I just kept adding more great pages. Now I have hundreds of pages and every time I want to change a link on my menu I have to do it to hundreds of pages!

I have looked into a php include but that would require too much of an overhaul. I would have to changed every page from html to php!

I have experiemented with CSS but that only seems to be able to handle design....not function.

How do I put my site menu on one page and call if from all other pages WITHOUT USING FRAMES!

Thank you for your suggestions in advance and I feel very fortunate to have found this forum!

 

Longhaired Genius

10+ Year Member



 
Msg#: 9988 posted 2:00 pm on Apr 2, 2005 (gmt 0)

PHP is the way to go, so bite the bullet and get down to work. You don't have to change every page from .html to .php, you can tell your server to parse php pages as if they were html. Don't experiment on your live site, get a domain just for testing and get your new code (either home-made or content-management system) and some sample pages working satisfactorily on it first.

Goober

10+ Year Member



 
Msg#: 9988 posted 2:07 pm on Apr 2, 2005 (gmt 0)

Congratulations on your site. This is most likely a very old idea, but what about making the menu an include file? That way all you have to do is change the menu once and it changes every page. Since I don't know PHP, it's sounds like the same thing.

Good luck,

Goober

jbryant

5+ Year Member



 
Msg#: 9988 posted 2:30 pm on Apr 2, 2005 (gmt 0)

Thanks Long Hair and Goober for your quick replies!

I knew this was the place to come for answers!

Okay.....I will look into php parsing as html.

Will I have to change the extension on every page from html to php?

That is what I am trying to avoid. I have spent 2 years accumulating my incoming links and I do not want to give them up!

Any information about this would greatly help.

How will a php include effect my SEO and ranking?

Thanks again and have a great day!

Elijah

10+ Year Member



 
Msg#: 9988 posted 2:44 pm on Apr 2, 2005 (gmt 0)

Okay.....I will look into php parsing as html.

Actually, it's the other way around. You want to parse HTML as PHP. ;)

Will I have to change the extension on every page from html to php?

No, by parsing the HTML pages as PHP you can include PHP code in pages and still keep the .html extension.

To make .html files be parsed for PHP code you just need to create and upload a file called .htaccess with the following content:
AddType application/x-httpd-php .php .php3 .phtml .html

Hope this helps,

Elijah

jbryant

5+ Year Member



 
Msg#: 9988 posted 3:09 pm on Apr 2, 2005 (gmt 0)

Wow...that was easy! Thanks Elijah.

I have already put it to work!
This is going to change my life!
Wish I would have known that sooner...lol.

Well, gotta start somewhere.

It does make me wonder what other little tricks I may have missed.

Do you have any more rabbits in your hat? :)

Thanks again!

rogerd

WebmasterWorld Administrator rogerd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 9988 posted 3:14 pm on Apr 2, 2005 (gmt 0)

If you aren't going to be using the power of PHP for including dynamic content in your pages, just using SSI (server side includes) will work too.

It's good design practice to have an include file for major repetitive page elements - header, footer, navbar, for example. That make adjusting any one of these areas as simple as uploading a new version of a small file.

Tools like Dreamweaver have site templates that let you change all pages on a site by changing the template. The downside is that once you get to hundreds of pages, it will update all the pages on your local drive; you must then upload the pages to the site. By the time you get to thousands of pages, this is very cumbersome. For small sites, though, it works; in addition, the use of templates can let you do major page restructuring and redesign around your content.

Yet another approach would be to convert to a content management system (CMS). There are some good free ones as well as commercial titles. This approach puts content in a database and displays it using templates. Site design can be changed by changing the template; usually, you can use different templates for different types of content or area of the site. The big plus of a CMS is that it makes adding new content very easy, often just filling in a web form. Duplicating your current page structure might be difficult, though.

jbryant

5+ Year Member



 
Msg#: 9988 posted 3:34 pm on Apr 2, 2005 (gmt 0)

I agree with you completely Rogerd.

I actually have a Xoops CMS integrated with another one of our websites and just love it!

I am interested in SSI as well as the Php.

Which is easiest to use and configure?

Most importantly, which is reccommend for best SEO!

Search Engine Ranking is very important to us!

Man...I love this Forum!

Thanks!

brdwlsh

10+ Year Member



 
Msg#: 9988 posted 6:00 pm on Apr 2, 2005 (gmt 0)

jb-

if you're looking for a quick fix try the 'find and replace' command in your html editor--i think most of them have it. definitely learn about SSI and PHP for the long-run.

brdwlsh

HughMungus

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 9988 posted 6:07 pm on Apr 2, 2005 (gmt 0)

Don't be afraid to invest the time to convert to PHP. Using mod_rewrite you can even maintain your current page names. What I would do if I were you is convert all my static pages to includes and have ONE template that's PHP that puts into itself whatever is necessary based on the URL. For example, if you have a page, [widgets.com...] then mod_rewrite would turn it into [widgets.com...] and that page would include an include file named green-shiny-widgets.inc (or .php or .txt or whatever) which is based on the query string?green-shiny-widgets. This will also let you have only one page to change should you want to change the menu, the whole website, etc. This will also allow you to use a database for your actual text, etc. etc. I have one website that's over 5,000 pages but it consists of ONE .php file to handle generate all the pages.

If you're in this for the long haul, learning PHP and MySql now will pay off in spades in the future.

PatrickDeese

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 9988 posted 6:09 pm on Apr 2, 2005 (gmt 0)

Using SSI or PHP includes have no affect on your SEO, per se - all you are doing is using it to add a snippet of HTML from an external to the pages. There is no way of identifying what parts are included, and which aren't.

TheRookie

5+ Year Member



 
Msg#: 9988 posted 7:26 pm on Apr 2, 2005 (gmt 0)

Wow, this is the exact topic I've been looking for. I have the same problem, and this thread is perfect. Any websites which give detailed outlines of how to do this parsing and whatnot? I really need help!

jbryant

5+ Year Member



 
Msg#: 9988 posted 7:59 pm on Apr 2, 2005 (gmt 0)

Yeah this is some great stuff guys!

I may be pushing my luck here but I would love to know more about that
mod_rewrite

It sounds like something I could do immediately while I learn more php.

The php is not looking too terribly difficult either.

Thanks for the info!
You just do not know how much you all have helped!

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 9988 posted 11:41 pm on Apr 2, 2005 (gmt 0)

Google shows about 8,000 pages on mod_rewrite at WebmasterWorld.

A good primer, for starters:
For mod_rewrite beginners [webmasterworld.com]

Then help yourself to the "buffet":
Google search results on WebmasterWorld [google.com]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved