SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    BLYAT! theGWS's Avatar
    Join Date
    Jun 2001
    Location
    Melbourne, AU & Seattle, WA
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to handle repeating HTML? Can it be stored externally?

    I have to build a 14 page site. All pages are static - (no PHP, ASP, etc). All 14 pages have the same header, footer, and left side menu. Can I put those three pieces of information into three separate external files so when I build or update the site it doesn't need to be done 14 times? I don't want to use frames.
    ~Dorian

  2. #2
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have server side scripting? Like php (or jsp capablities). You can then ask the server (simply) to include external filed before transmission.

    But since it's only 14 pages I think the effort is not really worth it. Just build a template with the static information thereon and use it to build your own pages. Having the server do work for you is just going to increase download times.

    IMHO involving scripitng is only worth it when you have changing information that you wish to include in pages.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  3. #3
    SitePoint Member KelvinQ's Avatar
    Join Date
    Dec 2003
    Location
    California
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup! php is definitely your solution. With php includes, you only have to update 1 time and it will automatically update your other 14 pages. Please let me know if you have any other questions.

  4. #4
    BLYAT! theGWS's Avatar
    Join Date
    Jun 2001
    Location
    Melbourne, AU & Seattle, WA
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, server side technologies are not an option - only client side. Does this mean I must do each page individually?
    ~Dorian

  5. #5
    The knight who said ni! RockyShark's Avatar
    Join Date
    Apr 2003
    Location
    Rockhampton, Australia
    Posts
    699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If server side is out, the only way I know of is to use templates in Dreamweaver (if you have it, of course!)

  6. #6
    Texan at Heart Corey Bryant's Avatar
    Join Date
    Sep 2003
    Location
    Castle Rock, CO
    Posts
    2,491
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can actually also convert the HTML easily to a JS file & then insert it that way.

  7. #7
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Corey Bryant
    You can actually also convert the HTML easily to a JS file & then insert it that way.
    and then marvel at how people without js or js disabled can't see a darned thing...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  8. #8
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unless you have access to server-side includes, then Dreamweaver templates are the best way to do this. Incidentally, FrontPage 2003 now supports templates as well, and it's cheaper than DW...
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  9. #9
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Corey Bryant
    You can actually also convert the HTML easily to a JS file & then insert it that way.
    And make it totally inaccessible to those who have to use alternative devices for screen reading - all for 14 pages.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.


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
  •