![]() | | ||||||||
| | #1 |
| HyperActive Warrior War Room Member Join Date: Jun 2008 Location: Los Angeles, CA USA.
Posts: 466
Thanks: 45
Thanked 19 Times in 18 Posts
|
One big problem with expanding websites is that when you make a change to the navigation bar, you then have to change the bar on every single web page. For smaller sites this isn't a big deal. But as your site gets larger it can be quite a pain in the neck. Is there anyway to change the navigation bar for all pages automatically in HTML? Thanks! |
| | |
| | #2 |
| Active Warrior War Room Member Join Date: Jan 2009 Location: Malaysia
Posts: 57
Thanks: 7
Thanked 3 Times in 3 Posts
|
Use a good text editor for to search and replace certain portion of your HTML codes and plain text content. An even better alternative, without the need to open individual files in text editor, is to use text search and replace utilities. Here are some useful links: Search and Replace for Windows - Funduc Software Free Text Search and Replace Utilities (thefreecountry.com) Hope you find them useful |
| | |
| | |
| | #3 |
| Advanced Warrior War Room Member Join Date: Feb 2008 Location: Escondido, CA. Becase San Marcos just wasn't hot enough.
Posts: 510
Thanks: 35
Thanked 56 Times in 55 Posts
|
I like to use php includes. One line inserted into each page will point to a file (where you create your navigation), and that file is then included in the resulting web page. One change to that file, and it's changed across all pages in your site.
|
| | |
| | #4 |
| HyperActive Warrior War Room Member Join Date: Jun 2008 Location: Los Angeles, CA USA.
Posts: 466
Thanks: 45
Thanked 19 Times in 18 Posts
| Would I have to re-write all the code in PHP or is that a small edit I can make in the HTML?
|
| | |
| | #5 |
| Advanced Warrior War Room Member Join Date: Feb 2008 Location: Escondido, CA. Becase San Marcos just wasn't hot enough.
Posts: 510
Thanks: 35
Thanked 56 Times in 55 Posts
|
It's pretty small, relatively speaking. It's easier to implement if you use it from the beginning, but not hard. Google it & you should be able to find examples pretty easily. What you WILL have to do is recreate your navigation bar. If you're using a table, it's copy & paste. Make a copy of you existing page before you start making changes. Save the new navigation file (with the only code being the table - no <html>, <body> or other tags) as a .htm file. Then you should be able to replace that code with the include statement. It will look something like this: <?php include('/nav.htm'); ?> Save your page as whatever.php. It will be a little work up front if you're going to have to replace existing code in multiple pages, but it's a lot less work in the long run. Once you get the hang of it, you'll start to look for ways to modularize your pages with this technique, and it can make life much simpler. HTH, Tim |
| | |
| | #6 |
| Senior Warrior Member War Room Member Join Date: Sep 2008 Location: Honolulu, Hawaii, USA & Montreal Canada
Posts: 2,218
Blog Entries: 1 Thanks: 759
Thanked 724 Times in 505 Posts
|
In your situation with an existing HTML site a PHP include is the best way to go. If you were starting from scratch you would be wise to use WordPress, Joomla or some other CMS. It makes it much easier to expand when the site needs to grow. Bill |
| | |
| | #7 | |
| HyperActive Warrior War Room Member Join Date: Jun 2008 Location: Los Angeles, CA USA.
Posts: 466
Thanks: 45
Thanked 19 Times in 18 Posts
| Quote:
Do you know if XsitePro has any kind of feature that helps with this? | |
| | |
| | #8 | |
| Senior Warrior Member War Room Member Join Date: Sep 2008 Location: Honolulu, Hawaii, USA & Montreal Canada
Posts: 2,218
Blog Entries: 1 Thanks: 759
Thanked 724 Times in 505 Posts
| Quote:
As far as I can tell it doesn't have any features to allow you to turn your site into a WordPress template, which is what you would need to do to convert to WordPress. If you decide to split the site and use include tags I'd use a good text editor that is "HTML aware" like PS Pad editor PSPad - freeware HTML editor, PHP editor, XHTML, JavaScript, ASP, Perl, C, HEX editor Take the original HTML and split the header, footer, menu bars, opt-in boxes and other common elements into separate files, save them with a .inc or .php extension. Then use a PHP Include statement to "include" the files where they are needed. PHP: include - Manual Again, in the future I'd strongly recommend WordPress or Joomla to create a site that can be infinitely expanded with minimal effort. If your host includes a CPanel with Fantastico you can get this setup in literally a few seconds, even a manual installation just takes a few minutes. In the long run it will be worth it. Software like XSitePro is still useful for simple squeeze pages. Bill | |
| | |
![]() |
|
| Tags |
| bigger, website |
| Thread Tools | |
| |
![]() |