SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Didn't create website template before,, what can i do now? pl help

    Hi Experts

    I have created my HTML website. It has 20+ pages. Now I want to place a banner on top of all pages. One option is to place that banner in every page one by one.

    I know there is some other way by which I will be able to put the banner somewhere only once and then it will appear on all pages. I should have created a template first before starting to create html pages... but what can i do now. how to avoid putting the banner in every page, and put it in some place once so that it will appear in all pages where i want it?

    thanks

  2. #2
    SitePoint Enthusiast avior's Avatar
    Join Date
    Jul 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by user786 View Post
    Hi Experts

    I have created my HTML website. It has 20+ pages. Now I want to place a banner on top of all pages. One option is to place that banner in every page one by one.

    I know there is some other way by which I will be able to put the banner somewhere only once and then it will appear on all pages. I should have created a template first before starting to create html pages... but what can i do now. how to avoid putting the banner in every page, and put it in some place once so that it will appear in all pages where i want it?

    thanks
    You can use javascript to insert the banner for you in every page. Or you can open up all of your files in your code editor and to a "find all" and replace your header code in one swoop. Technically it is putting the banner code in every page, but it's a fast and painless way to do it- assuming you're using a code editor with a "find all" and "replace" across multiple documents.

  3. #3
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks avior

    This is one method.. However in terms of website performance, it will be making website heavier, since the banner (which is an image) will be on every page. And if i decide to add more pages to my website like 20 or 30 more, this wouldn't be a good option.

    Is there a way to create a template sort of thing if possible at this stage (when now I already have 20+ pages of my website) and marge that template with my website pages. In the template I can put the banner and set it at its right location?

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,598
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    You can use either server side includes (SSI with .shtml files) or a server side language such as PHP that allows you to include content into all of the pages of your site.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •