Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#81857 - 18/03/2002 12:10 Another annoying web design question
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
Yet again, I have a little challenge.

As you may have seen, I don't like frames. I like having only one page on screen. For this reason I end up wanting to do things that would be quite simple with frames and needlessly hard without

redbutt2's help with my college band's page was fantastic. it was exactly what I needed. So here's another one for him or anyone to answer. I'm not sure if this is possible anyway.

Say I have a menu. From time to time the menu might change. If that menu is on all of my pages, changing one link would require editing every instance of it on each menu. Or maybe I want to add a section to the site. Same thing.

Is there an easier way? Can something like this be simplified? CSS makes stuff like this easy by providing one file to control all attributes. Is there a way to load HTML into a page from an external location? (this is where I start talking about stuff I know nothing about, this is all stuff I'm dreaming up ).

I hope I'm making this clear. I'll try to clear up the confusion if there is any.

Thanks.
_________________________
Matt

Top
#81858 - 18/03/2002 12:19 Re: Another annoying web design question [Re: Dignan]
ninti
old hand

Registered: 28/12/2001
Posts: 868
Loc: Los Angeles
If your server is ASP capable, change the extension of all the pages to pagename.asp and add a line in them:
<!--#include file="PieceofWebsite.inc"-->
and put all the menu code in that file. Changing the extension won't affect the pages in any other way.

If you are using Dreamweaver to create your pages, they have something called templates where you can edit the template and every page that uses that template will get changed automatically.
_________________________
Ninti - MK IIa 60GB Smoke, 30GB, 10GB

Top
#81859 - 18/03/2002 12:22 Re: Another annoying web design question [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Yes, there are a couple of ways to go about it. You're essentially talking about an "include" or something that behaves like an include.

Which way you choose to do it will depend upon how compatible you want the site to be. There are ways to do it in the page code if your users have a recent browser.

But if you want it to be compatible with all broswers including very old ones, then you have to do it all server-side. The www.riocar.org site is an example of this. Its left-hand navigation menu can be easily updated without having to make a change to all of the pages. There is a piece of software running on the web server (in this case, PHPNuke) which handles all of the updates to the left-hand navigation bar.
_________________________
Tony Fabris

Top
#81860 - 18/03/2002 12:24 Re: Another annoying web design question [Re: ninti]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Right, ASP is another example of how to do it server-side. But the server has to be running the Microsoft ASP server software in order for it to work.
_________________________
Tony Fabris

Top
#81861 - 18/03/2002 12:48 Re: Another annoying web design question [Re: tfabris]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Almost every server running Apache supports "Server Side Includes" or SSI for short. For a basic menu, this is the easiest. And of course, almost every IIS supports ASP, so you have a way to go no matter what the host runs. It can be done in PHP as well, but for a basic menu, look at SSI.

Top
#81862 - 18/03/2002 15:18 Re: Another annoying web design question [Re: drakino]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
The trick, I'm sure, is that the syntax is different, depending on which piece of server software you're running.
_________________________
Tony Fabris

Top
#81863 - 18/03/2002 15:34 Re: Another annoying web design question [Re: ninti]
redbutt2
member

Registered: 12/01/2002
Posts: 141
Loc: San Diego, CA
Without having read the rest of this...AHHH NOOOO...don't use ASP...use PHP, Server Side Includes, or a cgi. Stay away from ASP.

Now I'll keep reading.
_________________________
We need a bigger boat.

Top
#81864 - 18/03/2002 15:39 Re: Another annoying web design question [Re: Dignan]
redbutt2
member

Registered: 12/01/2002
Posts: 141
Loc: San Diego, CA
O.K. So, yes this is server dependant, but like was mentioned before, the chances of your server NOT supporting SSI are real slim, so try this first.

Make a new page with just the HTML/code for the menu. Now on all the pages that you want to put that menu on add a line like this in the spot the menu would sit...

<!--#include file="included.html" -->

Then save the page with the extension ".shtml". It won't work if you don't change the extension. That should do it.
_________________________
We need a bigger boat.

Top
#81865 - 18/03/2002 16:27 Re: Another annoying web design question [Re: redbutt2]
ninti
old hand

Registered: 28/12/2001
Posts: 868
Loc: Los Angeles
> NOOOO...don't use ASP

My apologies for offering a Microsoft solution. I forget where I was.
_________________________
Ninti - MK IIa 60GB Smoke, 30GB, 10GB

Top
#81866 - 18/03/2002 16:58 Re: Another annoying web design question [Re: ninti]
justinlarsen
old hand

Registered: 31/12/2001
Posts: 1109
Loc: Petaluma, CA
***slaps your rist***
_________________________
---- Justin Larsen

Top
#81867 - 18/03/2002 23:19 Re: Another annoying web design question [Re: redbutt2]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
Yet again, I am amazed by the response. Thank you all so much. When I actually get some free time, I'll apply this to my web pages. So cool. So very cool.

_________________________
Matt

Top
#81868 - 19/03/2002 09:26 Re: Another annoying web design question [Re: redbutt2]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Then save the page with the extension ".shtml". It won't work if you don't change the extension.

Doesn't Apache also have a kludge to enable SSI if the html file has the x bit set? or did I dream that bit?

That'd be helpful if your pages have been around for a while (i.e. if people may already have links to the .html filenames).

Peter

Top
#81869 - 19/03/2002 09:37 Re: Another annoying web design question [Re: peter]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Don't know about the execute bit, but you can (could?) set Apache to check all files for SSI, decreases performance though...

/Michael
_________________________
/Michael

Top
#81870 - 20/03/2002 00:26 Re: Another annoying web design question [Re: redbutt2]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
I have a question about this. What do I do about the index page? I tried it out and the file "index.shtml" isn't recognized the same way that "index.html" is. Is there some way around this, or am I going to have to be content editing two pages whenever I want to change the menu around?
_________________________
Matt

Top
#81871 - 20/03/2002 01:53 Re: Another annoying web design question [Re: Dignan]
johnmcd3
enthusiast

Registered: 19/04/2001
Posts: 369
Loc: Seattle, WA (formerly Houston,...
Somewhere in the configuration of your server you can set the order of files it looks for as a default display. Yours obviously has "index.html" and probably others ("index.htm"). In IIS (sorry, no experience w/ apache) it's under a tab in site properties or something like that. Add "index.shtml" to that.

Alternatively, as mentioned above you could enable your server software to check html files for SSI.
_________________________
1998 BMW ///M3 30 GB Mk2a, Tuner, and 10 GB backup

Top
#81872 - 20/03/2002 04:02 Re: Another annoying web design question [Re: johnmcd3]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
In Apache, set DirectoryIndex
_________________________
-- roger

Top
#81873 - 20/03/2002 13:38 Re: Another annoying web design question [Re: peter]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
_________________________
Bitt Faulk

Top
#81874 - 20/03/2002 16:51 Re: Another annoying web design question [Re: wfaulk]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
I have no idea what that page is about

I appreciate the help, but these suggests are made under the assumption that I can get someone to change/have access to the server. I'm at school right now. They are quite paranoid about their servers. They wouldn't let me change permissions for the server user on an organization web site so I could use the Gallery software.

So basically, is there anything I can do myself to fix it, short of an index page that forwards to the .shtml page?
_________________________
Matt

Top
#81875 - 20/03/2002 16:53 Re: Another annoying web design question [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
I appreciate the help, but these suggests are made under the assumption that I can get someone to change/have access to the server.

Not necessarily. Maybe you merely need to try the syntax of a server-side-include and it might just work. It's possible (likely, even) that your server operator has enabled server-side-includes and there's no problem.
_________________________
Tony Fabris

Top
#81876 - 20/03/2002 16:58 Re: Another annoying web design question [Re: Dignan]
guardian__J
enthusiast

Registered: 28/01/2002
Posts: 265
Loc: MI, USA
so you have no way at all to change the default page for a directory?
I think that the admins would probaly do this for you, it is a pretty basic and common function that needs to be set for different sites, so they may be willing if you ask them.
_________________________
guardian__J
MKIIa 20g Smoke

Top
#81877 - 20/03/2002 17:11 Re: Another annoying web design question [Re: Dignan]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
I'm not an apache expert, but can't he just drop a .htaccess file in his directory with a DirectoryIndex line? I don't think any settings or permission changes are needed.

Tom

Top
#81878 - 20/03/2002 20:46 Re: Another annoying web design question [Re: charcoalgray99]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
You can enable and disable .htaccess files within the main Apache config. It's worth a shot, but I wouldn't be surprised if it didn't work, or only worked for a small set of config options.
_________________________
Bitt Faulk

Top