Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Redundant Navigation Bar (And Site Recomendations)

Redundant Navigation Bar (And Site Recomendations)
Thread Tools
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Nov 2, 2003, 07:31 AM
 
My personal website (here) has a navigation bar (called subbanner in the code) that I want to be the same on all the pages of my site. Is there a way to do this? Currently, I have to update the html every time I modify a link or add something to the navigation bar. And since I use the same bar for all my pages, that's a lot of work. I have php and cgi access if that'll help, though I would like to stay with html+css. And the main page is generated by MovableType, so the solution must be compatible with that.

Also, I'm interested in any suggestions for site design.
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Nov 2, 2003, 11:50 AM
 
if you make a file called 'subbanner.html' in the root level of your site, which has the code for the bar, you can put it in any page using this php:
[php]
<? readfile("/subbanner.html"); ?>
[/php]

--will
     
Thinine  (op)
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Nov 5, 2003, 06:10 PM
 
I think you need to be a bit more specific. I really don't know what I'm doing here. Here is my site as it is now and here it is with what you recommended. As you can see, the subbanner is rendered, but with no content. I know it probably has to do with my subbanner.html file, I just don't know what.
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Nov 5, 2003, 07:57 PM
 
To do what he suggests, your server must have <A href="http://www.php.net">PHP</A> installed. If yours does, you only need to change your extension to .php and it should render. If you are running this server on your own Mac OS X machine, download the <A href="http://www.entropy.ch">entropy.ch package</A> and install it!

Also may want to look into <A href="http://httpd.apache.org/docs/howto/ssi.html">server-side includes</A> &lt;!--#include virtual="/page.html"--&gt;
Travis Sanderson
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:21 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2