SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member JoshFink's Avatar
    Join Date
    Mar 2001
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could someone give me a little insight into the best way to do this?

    I have a web site.. Very simple, but it has the same header and footer on each page.. How can I make it so whenever I make a change I don't have to make a change on each page. Granted, it's not that hard at this point to make a change to all the pages but if the site gets any bigger, it's going to be a hassle.

    Thanks,

    Josh

  2. #2
    SitePoint Zealot SoldierMail's Avatar
    Join Date
    Aug 2000
    Location
    South Carolina
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is done with SSI. Check out this site for a tutorial on it!


    http://www.bignosebird.com/ssi.shtml

  3. #3
    SitePoint Zealot cokeman's Avatar
    Join Date
    Dec 2000
    Location
    So. California
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or if you don't have SSIs, and you have PHP, you can use the include() function to insert a header file and trailer file in each page that you have..

  4. #4
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also use JavaScript and create like a nav.js and then link to it:

    Code:
    <SCRIPT SRC="http://www.yoursite.com/nav.js">
    However, I don't recommend doing this because it's more of a hassle to work in a .js file than a regular SSI file and it requires the user to have JavaScript enabled.

  5. #5
    SitePoint Member
    Join Date
    Feb 2001
    Location
    Horley, Surrey, UK
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using a web editing package, such as Dreamweaver, you can set up a template which includes your header and footer and then create pages from your template.

    Every time you want to change either your footer or header you simply edit the template which in turn will automatically update all of the pages that were created with the template.
    http://www.stattoshop.co.uk

  6. #6
    SitePoint Member
    Join Date
    Mar 2001
    Location
    Georgia & Washington
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MS Frontpage also supports this feature.

    I suggest Dreamweaver though. It is much nicer to my HTML and the longer I use it, the more I like. FrontPage, on the other hand, is a product where the more you use it, the less you like it.

    What you are asking for is the beginnings of the reason for Object Oriented programming. The advantages are reuse of code. Zope is an OO platform for developing dynamic web sites (http://www.zope.org). In Zope, you can create objects that can be reused throughout your entire site. Say you used your telephone number in many pages of your site. In Zope you could create a document called telephone.html and then include it in all your other HTML files as a variable like <dtml-var telphone.html>. The contents of telephone.html would be replaced in your pages whenever found. Now when you move, you change your number in one place instead of 10. (This is not meant to be a good use of Zope, just one that came to mind)


    Bill
    Spoke Technologies provides a fast and easy way to build web sites where people interact and contribute. Spoke's customizable, ready-to-use web components dramatically simplify the creation and maintenence of complex web sites. Spoke is a turnkey solution that integrates content management, membership, forums, articles, links, distributed publishing, administration, and more, while offering full control over look, feel, and features.


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
  •