Creating a default footer on a page

A

Advo

Hi there. basically what we are trying to do is create a default footer
page (links.html) which we can then have on every one of our pages,
meaning we dont have to change loads of pages, but just one page
(links.html) if things need altering.

Now i will hear you say use php, or asp.. i know I can do this, but the
client has requested us to not use that, nor use JS, and that his page
extension must remain as .html.

I tried using an iframe, but this did not work as expected..it showed
the content of links.html ok, but when the user views the page, all
they basically see is <iframe src="links.html"></iframe> rather than
the other stuff in links, so imageing if links.html contained:

<a href="some_page.html">test link</a>

then viewing our current main page would also show that, thus it looks
like all the links etc within the links.html page, also appear in the
source of the main page, this is for SEO reasons etc.

Any ideas please?

Thanks for your time
 
D

dorayme

"Advo said:
Hi there. basically what we are trying to do is create a default footer
page (links.html) which we can then have on every one of our pages,
meaning we dont have to change loads of pages, but just one page
(links.html) if things need altering.

Now i will hear you say use php, or asp.. i know I can do this, but the
client has requested us to not use that, nor use JS, and that his page
extension must remain as .html.

I tried using an iframe, but this did not work as expected..it showed
the content of links.html ok, but when the user views the page, all
they basically see is <iframe src="links.html"></iframe> rather than
the other stuff in links, so imageing if links.html contained:

<a href="some_page.html">test link</a>

then viewing our current main page would also show that, thus it looks
like all the links etc within the links.html page, also appear in the
source of the main page, this is for SEO reasons etc.

Any ideas please?

Yes. Given the restrictions you mention, put the footer on every
page. If you change it, do it auto with a simple Find and Replace
in any decent text editor. And structure you files in such a way
that you can easily upload to the server, keep all the html files
concerned in their own folders without other things like pics -
so you don't need to comb thru to select them out...
 
A

Advo

Ahh. i thought that may be the case, so theres no other way of doing it
without the use of say ASP, JS or PHP, just solely in html?
 
B

Brian Cryer

dorayme said:
Yes. Given the restrictions you mention, put the footer on every
page. If you change it, do it auto with a simple Find and Replace
in any decent text editor. And structure you files in such a way
that you can easily upload to the server, keep all the html files
concerned in their own folders without other things like pics -
so you don't need to comb thru to select them out...

I have a similar issue and if you rule out php, asp, ssi, js etc then
dorayme's solution is the only one I could find that worked. I started using
a find and replace tool, but have recently moved on to a html-preprocessor,
but the basic solution remains the same - put it in the html files and be
prepared to do global find and replace when necessary.
 
A

Advo

ssi

Isnt that part of ASP?

I have seen something on that, and think i tried it? although i cant
remember. Do you have something special set up in order for it to work?

Cheers
 
A

Advo

Actually now, ive got the other problem. I tried using JS, that worked
fine to display the information, but when i view the source, all i see
is the following;

<script src="javascript/footer_test.js">
</script>

What im after is for the contents of footer_test.js which is basically
html links, to also be shown on this main page of source if that makes
sense.

Any ideas
 
L

Luigi Donatello Asero

Advo said:
Actually now, ive got the other problem. I tried using JS, that worked
fine to display the information, but when i view the source, all i see
is the following;

<script src="javascript/footer_test.js">
</script>

What im after is for the contents of footer_test.js which is basically
html links, to also be shown on this main page of source if that makes
sense.

Any ideas

Are you talking about including the contents of a footer in a html page or
in a php page or in an asp page?
 
B

Brian Cryer

Advo said:
ssi

Isnt that part of ASP?

I don't use server side includes (because my original host didn't support
them), but I believe that ssi is quite independent of asp (or php etc). The
Apache documentation puts it more clearly than I could
(http://httpd.apache.org/docs/1.3/howto/ssi.html): "They [SSI] let you add
dynamically generated content to an existing HTML page, without having to
serve the entire page via a CGI program, or other dynamic technology." So,
ssi is implemented by the webserver and is different from asp, php etc where
it delegates to another application. (I'm sure someone will put me right if
I'm mistaken.)
I have seen something on that, and think i tried it? although i cant
remember. Do you have something special set up in order for it to work?

Sorry, my knowledge of ssi is rather lacking. A search through the Apache
documentation should show you what you need to know. If you are using IIS
then this might be a good starting place -
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q203064, but to be
honest its just the first relevant looking article that came up when I
searched for "ssi iis".
 
A

Advo

well our hosting company uses IIS and we can do custom stuff on it
anyway, so im thinking that now rules out SSI's :(
 
D

Dylan Parry

Advo said:
well our hosting company uses IIS and we can do custom stuff on it
anyway, so im thinking that now rules out SSI's :(

SSI works just fine on IIS, as long as you set it up properly.
 
J

Jonathan N. Little

Dylan said:
SSI works just fine on IIS, as long as you set it up properly.

SSI may violate one of your conditions though, that the file names
remain the same '.html'. Typically servers are setup such that the file
extension 'shtml' is required for SSI. Unless you have access to
customize the the server, most do not, SSI will not work for you under
the constraints you have set. Cut'n Paste looks like your only option....
 
A

Adrienne Boswell

Hi there. basically what we are trying to do is create a default footer
page (links.html) which we can then have on every one of our pages,
meaning we dont have to change loads of pages, but just one page
(links.html) if things need altering.

Now i will hear you say use php, or asp.. i know I can do this, but the
client has requested us to not use that, nor use JS, and that his page
extension must remain as .html.

Your client may be under the impression that search engines do not like
dynamically generated pages. You can assure your client this is not the
case, and that if the pages are writen with clean markup, so bot will
have any issues at all.

If the pages do not have changes very often, you could write something in
ASP to generate the HTML pages, then generate them only when there is a
change. Or use a preprocessor as others have mentioned.
 
B

Brian Cryer

Advo said:
Actually now, ive got the other problem. I tried using JS, that worked
fine to display the information, but when i view the source, all i see
is the following;

<script src="javascript/footer_test.js">
</script>

What im after is for the contents of footer_test.js which is basically
html links, to also be shown on this main page of source if that makes
sense.

Any ideas

I thought in your original post you said that JavaScript was out?

If you use JavaScript then yes, if you view the source then you will see
what you are seeing. That's because "<scirpt ...>" is in your source. Its
only after the JavaScript has run in the browser that you see the links you
are after. Does it matter if someone does a show-source and sees that you
are using JavaScript?

Be aware that if you go the JavaScript route then it won't work for those
users who don't have JavaScript enabled. I know the standard response to
that statement is that the vast majority of users do have JavaScript enabled
(quite true), but most bots when they look at your site will ignore
JavaScript. This means that if one of your objectives in having a footer
with links is to ensure that every page has a link back to your homepage
(and thus boost the pagerank of your homepage) then it won't achieve this
goal because search engine bots won't see the link.
 
D

David

Jonathan said:
SSI may violate one of your conditions though, that the file names
remain the same '.html'. Typically servers are setup such that the file
extension 'shtml' is required for SSI. Unless you have access to
customize the the server, most do not, SSI will not work for you under
the constraints you have set. Cut'n Paste looks like your only option....

Not really. One could have the extension of .htm or .html with SSI, but
they would need to let the server know to parse such said pages. That
could be done by using the chmod +x filename. Being a Linux user with
Apache I know quite well that it can be done. Not sure if IIS has
anything like that though.
 
A

Andy Dingley

Advo said:
Actually now, ive got the other problem. I tried using JS,
that worked fine to display the information,

No it didn't. It worked fine _for_you_. It'll fail for a lot of
people, and it'll fail for Googlebot. You ought to care about that last
one.
 
J

Jonathan N. Little

David said:
Not really. One could have the extension of .htm or .html with SSI, but
they would need to let the server know to parse such said pages. That
could be done by using the chmod +x filename. Being a Linux user with
Apache I know quite well that it can be done. Not sure if IIS has
anything like that though.

I didn't offer +x hack because I believe the OP is on IIS...
 
N

Neredbojias

Actually now, ive got the other problem. I tried using JS, that worked
fine to display the information, but when i view the source, all i see
is the following;

<script src="javascript/footer_test.js">
</script>

What im after is for the contents of footer_test.js which is basically
html links, to also be shown on this main page of source if that makes
sense.

Any ideas

Then you _must_ use something like php because you are asking for a
dynamically-generated page.
 
J

JAF

Hi there. basically what we are trying to do is create a default footer
page (links.html) which we can then have on every one of our pages,
meaning we dont have to change loads of pages, but just one page
(links.html) if things need altering.
snip

then viewing our current main page would also show that, thus it looks
like all the links etc within the links.html page, also appear in the
source of the main page, this is for SEO reasons etc.

Any ideas please?

Thanks for your time

Why don't you want to consider something like php?

Someone must have some misconceptions about SEO or how html pages are
generated on the web and not understand how php is seen by the server
but not the search engine or web browsers.

Let me make a case of php, but the ideas I will throw out are
applicable to many other approaches and languages, not just php.

I too have tried to do what you are trying to do. After flailing
around with frames and iframes and server side includes, I settled on
php. (to work your server has to be able to process php of course.
Is this the problem?)

Let me give you an example, but remember one thing before I begin: php
code is only seen by the server. Visitors to your web site will see
html code only, not php code. Perhaps the person that has placed
restrictions on you does not know this. Now the sample.

If I have an html page, I "include" a text file which contains php
code. For example, my html page, when viewed on the server, has this
code in it:

<TD>

<? include $phpdir . "home_line_links.txt"; ?>

</TD>

The actual html code for the links is obviously in
home_line_links.txt.

But here is the same html code when viewed by a browser, which is also
what a search engine sees:

<TD>

<P align=center><A
href="http://www.bscinc.net/index.php">Home</A> </FONT>

snip - Note: more links go here

</P>

</TD>

If I were to modify my home_line_links.txt file that contains all of
the links, every page that includes it will instantly reflect the
change.

Now your html page has to be parseable by php, ie your html page in
effect as to be a php page. But you do not have to use the extension
..php only. Web pages with the extension .html can be used for php.
(By the way Google and other search engines have no trouble with .php
as an extension. Search on almost anything on the web and you should
see in the first 10 pages the extension .php somewhere in the link.)

And if you want the links to be on their own page, You can create a
separate web page just to hold the links. A site map page does this
also by the way.

The reason I wanted to bring up the php in spite of your saying it was
not an option is this: using php, and other languages also, can
greatly reduce the time of maintaining pages. You are trying to find
a way to save on maintaining bottom links, but php can help reduce
maintenance time in many ways.

I started using php when I realize so much of my html code from page
to page was the same. Many sections on one page, from the header to
top links to side links to bottom links to parts of my content were
the same on other pages.

Why retype these sections when creating a new page? Not only that but
why spend time when I had to change a link on one page, say for the
left navigation links, when I could change it on all pages with a
minimum of typing?

For example, on some web sites I have done, I created what I call a
web site heading. The web site heading consists of a marketing tag
line, like "World's Greatest Widgets", and I put this on the top of
every page along with the appropriate heading tags. I do this with
the php include code shown above, referring to a web_heading.txt file
that contains the appropriate code.

Then about every two months or so, I go in and change the tag line to
something like, "Affordable Widgets" or "Plastics Widgets" or "Small
Business Widgets". Once I have changed one line in the php text file,
all of my web pages that have included this text file in them now have
a new heading in them.

Hope this helps. If you are uncomfortable about php or if the owner
of the web site is uncomfortable, I can email you some samples to show
how easy php is for doing what you want to do.

Best regards,

JAF
http://www.bscinc.net
http://www.affordablefloridainsurance.com
http://www.americanltci.com
 
D

dorayme

JAF said:
Hope this helps. If you are uncomfortable about php or if the owner
of the web site is uncomfortable, I can email you some samples to show
how easy php is for doing what you want to do.

Best regards,

JAF

You are welcome to email me too JAF, I like to see examples of
this. Good on you for taking the trouble to write your post
here... please use an eye catching title like PHP EXAMPLES as I
am a bit frightened to ever look at any mail to dorayme.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top