View Full Version : Another Question
omgwtfdan
08-02-2005, 10:58 AM
Okay, so I have another question to ask you guys. I've surfed around the net and haven't really found an answer.
Anyways, I have the same navigation on every single page. Is there a way I can make this into an external page, such as css? So I can just modify that one page and it will modify all the pages? Is this possible?
Thank You
Kentor
08-02-2005, 11:51 AM
It's not possible to do this with pure html.
Do you have Server side includes (uses .shtml)? or php?
If you don't have either I guess you can use those nasty frames...
Threeboy
08-02-2005, 01:52 PM
you COULD use an external javascript file and include it on your pages for a nav - then you'd just have one file to update.
With PHP it's fairly easy, it only requires that you have php enabled on your site, and for the document you are placing the code in to have a .php extension. Then where your navigation normally goes in your code, put this;
<?php
include('insert.file.name.here');
?>
In the navigation file you can put html etc.
Jamblo
08-02-2005, 11:49 PM
...or even just a text file
omgwtfdan
08-03-2005, 11:59 AM
Looks like I should start learning Java and PHP. Shouldn't take me too long, though, considering I learnt HTML and CSS in a week.
Thanks for all the help. I appreciate it.
[edit] Jamblo, how would you do that?
Jamblo
08-03-2005, 11:58 PM
Well, continuing from what NMO said... you include nav.txt or whatever, and just have the raw html in there... what i'm saying is you don't necessarily have to include a html file. Ideally you'd include it as a .php file, as then you'd still be able to view it in a WYSIWYG editor, but wouldn't need unnecessary duplicate head/body tags. Best of both worlds.
cOnflictXX
08-04-2005, 06:50 AM
1. Find out if your FTP server supports PHP or ASP
2. Make a text file of your included file
3. Save the file in a specific directory (i.e. "includes")
If your server supports ASP
4. Rename your file to extension .asp (instead of .html)
5. Use the code <%include file="includes/blah.txt"%> in your HTML, where the code would normally be, obviously replacing includes/blah.txt with the actual path to your included text file.
If your server supports PHP
4. Rename your file to extension .php (instead of .html)
5. Use the code <?php include 'includes/blah.txt';?> in your HTML, where the code would normally be, obviously replacing includes/blah.txt with the actual path to your included text file.
6. Upload that shit.
omgwtfdan
08-04-2005, 09:46 AM
okay, thanks guys.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.