#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2009
    Posts
    16
    Rep Power
    0

    How to include duplicate markup in every web page


    If all my web pages have the same navigation and footer markup, what is the best way of avoid hard-coding this in every page, so if it needs changing it's only changed in one place so as not to have to edit every html file?

    Thanks
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,745
    Rep Power
    9397
    Are you using a server-side language like PHP or .NET?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2009
    Posts
    16
    Rep Power
    0
    Originally Posted by requinix
    Are you using a server-side language like PHP or .NET?
    The client has provided me with a JS abstraction layer for backend database access. So I can't write PHP or .NET in this case. But the Front End Dev has to be pure markup or JS to generate any markup dynamically.
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    Tell your client that that is horribly inefficient. For any site that's big enough to need a database, it needs access to a server-side language as well.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo