Creating a default footer on a page

Discussion in 'HTML' started by Advo, Aug 8, 2006.

  1. Advo

    Advo Guest

    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
    Advo, Aug 8, 2006
    #1
    1. Advertising

  2. Advo

    dorayme Guest

    In article
    <>,
    "Advo" <> wrote:

    > 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...

    --
    dorayme
    dorayme, Aug 8, 2006
    #2
    1. Advertising

  3. Advo

    Advo Guest

    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?


    dorayme wrote:
    > In article
    > <>,
    > "Advo" <> wrote:
    >
    > > 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...
    >
    > --
    > dorayme
    Advo, Aug 8, 2006
    #3
  4. Advo

    Brian Cryer Guest

    "dorayme" <> wrote in message
    news:...
    > In article
    > <>,
    > "Advo" <> wrote:
    >
    >> 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...


    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.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Aug 8, 2006
    #4
  5. Advo

    Advo Guest

    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


    Brian Cryer wrote:
    > "dorayme" <> wrote in message
    > news:...
    > > In article
    > > <>,
    > > "Advo" <> wrote:
    > >
    > >> 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...

    >
    > 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.
    > --
    > Brian Cryer
    > www.cryer.co.uk/brian
    Advo, Aug 8, 2006
    #5
  6. Advo

    Advo Guest

    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
    Advo, Aug 8, 2006
    #6
  7. "Advo" <> skrev i meddelandet
    news:...
    > 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?

    --
    Luigi Donatello Asero
    https://www.scaiecat-spa-gigi.com/it/svezia.html
    Vad kallar man Sverige på italienska?
    E l´Italia in svedese?
    Luigi Donatello Asero, Aug 8, 2006
    #7
  8. Advo

    Brian Cryer Guest

    "Advo" <> wrote in message
    news:...
    > 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".
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Aug 8, 2006
    #8
  9. Advo

    Andy Dingley Guest

    Andy Dingley, Aug 8, 2006
    #9
  10. Advo

    Advo Guest

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


    Andy Dingley wrote:
    > Advo wrote:
    >
    > > 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,

    >
    > http://allmyfaqs.net/faq.pl?Include_one_file_in_another
    >
    > Just use SSI. Easy.
    Advo, Aug 8, 2006
    #10
  11. Advo

    Dylan Parry Guest

    Advo wrote:
    > 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.

    --
    Dylan Parry - http://webpageworkshop.co.uk

    Programming, n: A pastime similar to banging one's head
    against a wall, but with fewer opportunities for reward.
    Dylan Parry, Aug 8, 2006
    #11
  12. Dylan Parry wrote:
    > Advo wrote:
    >> 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.
    >


    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....

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Aug 8, 2006
    #12
  13. Gazing into my crystal ball I observed "Advo" <>
    writing in news::

    > 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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Aug 8, 2006
    #13
  14. Advo

    Brian Cryer Guest

    "Advo" <> wrote in message
    news:...
    > 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.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Aug 8, 2006
    #14
  15. Advo

    David Guest

    Jonathan N. Little wrote:
    > Dylan Parry wrote:
    >> Advo wrote:
    >>> 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.
    >>

    >
    > 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.
    David, Aug 8, 2006
    #15
  16. Advo

    Andy Dingley Guest

    Advo wrote:

    > 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.
    Andy Dingley, Aug 8, 2006
    #16
  17. David wrote:
    > Jonathan N. Little wrote:
    >> Dylan Parry wrote:
    >>> Advo wrote:
    >>>> 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.
    >>>

    >>
    >> 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.


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

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Aug 8, 2006
    #17
  18. Advo

    Neredbojias Guest

    To further the education of mankind, "Advo" <>
    vouchsafed:

    > 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.

    --
    Neredbojias
    Infinity has its limits.
    Neredbojias, Aug 13, 2006
    #18
  19. Advo

    JAF Guest

    On 8 Aug 2006 01:32:07 -0700, "Advo" <> wrote:

    >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
    JAF, Aug 13, 2006
    #19
  20. Advo

    dorayme Guest

    In article <>,
    JAF <bscinc@Yahoo_NoSpam.com> wrote:

    > 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.

    --
    dorayme
    dorayme, Aug 13, 2006
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jurjen de Groot

    Print webpage without default IE header/footer

    Jurjen de Groot, Jan 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,360
    Jurjen de Groot
    Jan 20, 2004
  2. ashj
    Replies:
    0
    Views:
    2,773
  3. Gaetan
    Replies:
    3
    Views:
    1,409
    Juan T. Llibre
    Feb 14, 2006
  4. Sean Dockery
    Replies:
    3
    Views:
    874
    Sean Dockery
    Jun 21, 2009
  5. Henrik
    Replies:
    1
    Views:
    417
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page