473,691 Members | 2,468 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 4702
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
2484
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
2682
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
6324
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
9079
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8791
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7624
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...
0
4322
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2966
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
2229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1954
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.