473,695 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help putting standard headers on all pages

I've been looking for references for some weeks now, but haven't found
an answer to the following question. I'd love some help on this:

*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard
header on all pages within a site? The design goal is to have the
header links and title graphic on every page kept in some single
place, so that a change to the header data doesn't require changing
every single html file on the site. (The sites in question are my
personal sites - see signature).

In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.

Thanks for any pointers...

--
Lewin A.R.W. Edwards
Projects - http://www.zws.com/
Personal - http://www.larwe.com/

Sep 21 '08 #1
68 4704
In article
<1e************ *************** *******@d45g200 0hsc.googlegrou ps.com>,
zw*******@gmail .com wrote:
*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard
header on all pages within a site?
In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.
Why would you think there ought to be a way to do it in CSS? CSS is
about making things pretty, not supplying content.

--
dorayme
Sep 21 '08 #2
On Sep 20, 9:22*pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.

Why would you think there ought to be a way to do it in CSS? CSS is
about making things pretty, not supplying content.
Perhaps mainly because I'm not a CSS expert - if you look at my sites
you'll see they are 90% text (=content) and *very* little sugar. It
just seemed to me that there should be a way to do it. But I'm happy
to accept that CSS doesn't contain an answer - do you have a
suggestion for something that does?

I don't want to use active scripting because I personally tend to run
with it disabled. And I CERTAINLY won't use Java or plugin nonsense
like Flash!
I don't want to use frames because historically they have caused me
problems with content not being indexed properly by search engines.
I don't want to use SSIs because they severely impact performance on
my provider.

That didn't seem to leave much else in the way of technologies. If I
have to choose a single evil I guess it would be frames. I'd like to
hear of an alternative though.

Sep 21 '08 #3
zw*******@gmail .com writes:
On Sep 20, 9:22Â*pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.

Why would you think there ought to be a way to do it in CSS? CSS is
about making things pretty, not supplying content.

Perhaps mainly because I'm not a CSS expert - if you look at my sites
you'll see they are 90% text (=content) and *very* little sugar. It
just seemed to me that there should be a way to do it. But I'm happy
to accept that CSS doesn't contain an answer - do you have a
suggestion for something that does?

I don't want to use active scripting because I personally tend to run
with it disabled. And I CERTAINLY won't use Java or plugin nonsense
like Flash!
I don't want to use frames because historically they have caused me
problems with content not being indexed properly by search engines.
I don't want to use SSIs because they severely impact performance on
my provider.
That's odd.
That didn't seem to leave much else in the way of technologies. If I
have to choose a single evil I guess it would be frames. I'd like to
hear of an alternative though.
The usual method it to include some sort of build step when making the
site. There are literally dozens of options from WYSIWYG site editing
software to using a macro processor and something like make.

If you don't know what these last two are, then they are probably not
right for you. They may be one day, but there is more to learn that
way. Unfortunately I don't know much about the former. You may get
some actual recommendations for others...

--
Ben.
Sep 21 '08 #4
zw*******@gmail .com wrote:
I've been looking for references for some weeks now, but haven't found
an answer to the following question. I'd love some help on this:

*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard
header on all pages within a site? The design goal is to have the
header links and title graphic on every page kept in some single
place, so that a change to the header data doesn't require changing
every single html file on the site. (The sites in question are my
personal sites - see signature).

In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.
Absolutely. Look up "server-side includes" and possibly some server-side
programming technology such as PHP, ASP.NET, Perl, etc.
Sep 21 '08 #5
On Sep 20, 9:45*pm, Ben Bacarisse <ben.use...@bsb .me.ukwrote:
The usual method it to include some sort of build step when making the
site. *There are literally dozens of options from WYSIWYG site editing
software to using a macro processor and something like make.
Hmm... I didn't include that in the list because it's not the design
goal - I don't want to have to re-upload every single HTML file. I
don't know if it's my hosting provider (Verve) or something else, but
I frequently get dropped/stalled connections.

I'm kinda surprised that this is really the "usual" method though. It
seems like a really common requirement, it astounds me that there is
no elegant solution.

At the moment I'm using the free version of Visual Web Developer
(inside VirtualBox on my MacBook - it's the best free WYSIWYG CSS-
supporting HTML editor I can find). I'm not sure if it supports this
feature. I don't "do" the traditional text processing languages like
perl, but I guess it would be a simple matter to write a C program
that recursively descends the tree, looks for some magic tokens like
<!--##headerbegin##--<!##--headerend##--and replaces whatever's in
between with my generic site header. I was hoping to be able to have a
"news of the week" or "news of the day" item in this header, i.e.
relatively frequent updates without rewriting everything.
Sep 21 '08 #6
On Sep 20, 10:07*pm, Harlan Messinger
<hmessinger.rem ovet...@comcast .netwrote:
*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard


Absolutely. Look up "server-side includes" and possibly some server-side
programming technology such as PHP, ASP.NET, Perl, etc.
You missed the part where I explicitly stated that I did not want to
use server-side includes. They cause a big performance penalty on my
hosting provider. A minor point is that they also make it harder for
me to migrate the site around different servers. The less technology I
use in my site, the less proprietary/provider-specific infrastructure
I'm relying on.

Sep 21 '08 #7

zw*******@gmail .com wrote:
>
*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard
header on all pages within a site?
Look up pre-processors.

--
Berg
Sep 21 '08 #8
In article
<77************ *************** *******@x41g200 0hsb.googlegrou ps.com>,
zw*******@gmail .com wrote:
On Sep 20, 9:22*pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.
Why would you think there ought to be a way to do it in CSS? CSS is
about making things pretty, not supplying content.

Perhaps mainly because I'm not a CSS expert
No, it is *not* because of this. It is because of a basic
misunderstandin g about the role of CSS. CSS is to make things pretty, it
has nothing at all in principle to do with content or meaning. There are
some CSS provisions to add a bit of this and that by way of content but
it is an oddity and unsuited to your purpose.
- if you look at my sites
you'll see they are 90% text (=content) and *very* little sugar. It
just seemed to me that there should be a way to do it. But I'm happy
to accept that CSS doesn't contain an answer - do you have a
suggestion for something that does?
Yes, two.

1. For small sites of a few pages, say 5 to 20, don't mess about with
"includes", more bother than is worth it unless you are real pro and it
is like water off a duck's back. Just learn about how to insert text
globally in a good text editor using Find & Replace. No doubt, along
will be coming advice to get a preprocessor, but don't bother if you
have a text editor to find and replace over all the files in a folder
(*You* do something once, and *it* does something 20 times). When you
update to the server, you still do one thing, namely drag a group of 20
from your PC to the server window in your FTP program.

I am conscious of telling you to do what you have expressly said you do
not want to do. But I press on insensitively anyway...

2. Use a server side include. Here is a snippet from one of my website
HTML docs as it appears on my computer:

<?php include
($_SERVER['DOCUMENT_ROOT'].'/somedomain/includes/banner.inc'); ?>

And in the folder "includes" on the server, I have, amongst other
things, a file with banner material markup called banner.inc

There are other ways to have includes, not using PHP.

But one way or another, you have to learn how to do this and also have a
server that does not mess about and provides for such things. Even many
free servers will give you these things these days.
I don't want to use active scripting because I personally tend to run
with it disabled. And I CERTAINLY won't use Java or plugin nonsense
like Flash!
I don't want to use frames because historically they have caused me
problems with content not being indexed properly by search engines.
I don't want to use SSIs because they severely impact performance on
my provider.

That didn't seem to leave much else in the way of technologies. If I
have to choose a single evil I guess it would be frames. I'd like to
hear of an alternative though.
You could reconsider Frames and try to mitigate all the evil powers that
ray out from this poor child of a much maligned technology. Read and
take some but not too much heart from:

<http://www.markparnell .com.au/articles/frames.php>

--
dorayme
Sep 21 '08 #9
In article
<21************ *************** *******@i76g200 0hsf.googlegrou ps.com>,
zw*******@gmail .com wrote:
On Sep 20, 10:07*pm, Harlan Messinger
<hmessinger.rem ovet...@comcast .netwrote:
*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard

Absolutely. Look up "server-side includes" and possibly some server-side
programming technology such as PHP, ASP.NET, Perl, etc.

You missed the part where I explicitly stated that I did not want to
use server-side includes. They cause a big performance penalty on my
hosting provider. A minor point is that they also make it harder for
me to migrate the site around different servers. The less technology I
use in my site, the less proprietary/provider-specific infrastructure
I'm relying on.
Just btw, now I see this reply to another poster, in my last post, the
construction you saw in my example php include was for the express
purpose of portability, at least on all Unix type servers, both my home
one and the most popular public ones. (Window's servers are a bit of a
nuisance and you need different path instructions. But just try to avoid
such servers if you can).

Sounds to me like you might need to get a different host or (for a small
fee) I could ask my dark sunglass team of men to pay them a little visit
and advise them not to be giving you so much trouble.

--
dorayme
Sep 21 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
1520
by: xxx | last post by:
I'm having a little trouble understanding why a derivative class cannot access a protected member of the base class in the following code: #include <stdio.h> class CBase { protected: int x;
8
5473
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
37
2487
by: John Salerno | last post by:
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our server is through mod_python integration with the apache. These are the steps needed for you to be able to run .py script directly
41
2683
by: c | last post by:
Hi every one, Me and my Cousin were talking about C and C#, I love C and he loves C#..and were talking C is ...blah blah...C# is Blah Blah ...etc and then we decided to write a program that will calculate the factorial of 10, 10 millions time and print the reusult in a file with the name log.txt.. I wrote something like this
4
6329
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59 Notice: Undefined index: args in /home/mattehz/public_html/acssr/trunk/inc_error.php on line 92 Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_error.php on line 92
0
8647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7681
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3023
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2285
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.