Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Cross Site Template Maintainance

Options
  • 03-10-2008 6:40pm
    #1
    Registered Users Posts: 546 ✭✭✭


    That's the best title I could come up with...


    Basically I have a website and 50% of the contents is common to all pages (head, foot and navigation).
    But if I change so much as a single character in this common content I then have to edit each and every page separately.

    This is a pain in the proverbials.

    Are there any HTML editors or other tools to help me maintain consistency across the site? Preferably open source or free.


Comments

  • Registered Users Posts: 3,594 ✭✭✭forbairt


    I'd strongly advice getting yourself a CMS (content management system)

    Failing that invest a bit of time in figuring out php include files for headers / footers ...

    Or if you're a bit more of a programmer check out smarty

    That said what languages are you using ?
    Windows / Linux ?

    .shtml (server side includes) may be the way to go


  • Registered Users Posts: 546 ✭✭✭fleet


    oooo php include files seem like the trick.

    I did want to avoid anything but XHTML and CSS but if PHP will make my life easier then so be it.

    I'll look at a CMS too just to be sure.

    Nice one forbairt :)

    PS - I'm running Linux/Windows but the host is a Linux box with everything (Host Gator).


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    fyi As well as php includes you could have server side includes and javascript includes.


  • Registered Users Posts: 6,496 ✭✭✭daymobrew


    Server side includes is probably the least load on the server as it is all done by the server without invoking an external process.


  • Registered Users Posts: 2,119 ✭✭✭p


    I'll also recommend server side includes. They're a little easier to start with than PHP includes and generally work a little handier in browsers.

    The only minor issue with any kind of includes is that you can't view them without uploading them to the server.

    Dreamweaver has it's own templating system which is all plain HTML, but unless you're using DW already, I wouldn't use it.


  • Advertisement
  • Registered Users Posts: 569 ✭✭✭none


    Another option is pure JavaScript where you output common fragments with document.write(). The benefit is that it will run on any hosting regardless of server OS and software. The drawback is that it won't be properly indexed by search engines. This way one function call at the top or bottom of the page will produce the common menu or footer on all pages.


  • Registered Users Posts: 6,496 ✭✭✭daymobrew


    none wrote: »
    Another option is pure JavaScript where you output common fragments with document.write().
    I would not recommend this - if the client browser does not have Javascript enabled then it will not work.


  • Registered Users Posts: 546 ✭✭✭fleet


    That's magic lads.


    I still haven't decided which route to take, but you've laid out all the options for me now.

    :)


  • Registered Users Posts: 2,119 ✭✭✭p


    none wrote: »
    Another option is pure JavaScript where you output common fragments with document.write(). The benefit is that it will run on any hosting regardless of server OS and software. The drawback is that it won't be properly indexed by search engines. This way one function call at the top or bottom of the page will produce the common menu or footer on all pages.
    I'm sorry, but this is in no way suitable for the original posters needs.

    SSI, PHP Includes, or Dreamweaver Templates would all suffice quite adequately.


  • Registered Users Posts: 569 ✭✭✭none


    daymobrew wrote: »
    I would not recommend this - if the client browser does not have Javascript enabled then it will not work.

    Well, in many cases this means that such a client has nothing to do on the site. No serious Website works without JavaScript now.
    p wrote: »
    I'm sorry, but this is in no way suitable for the original posters needs. SSI, PHP Includes, or Dreamweaver Templates would all suffice quite adequately.

    Why not? It's much more flexible than any server-side technology and sometimes even easier.


  • Advertisement
  • Registered Users Posts: 2,119 ✭✭✭p


    none wrote: »
    Why not? It's much more flexible than any server-side technology and sometimes even easier.
    Because it's complicated, confusing, and a messy messy hack at best. Definitely not suitable for the original poster.


  • Registered Users Posts: 35,524 ✭✭✭✭Gordon


    If you aren't so hot with scripting and ssi and it absolutely must be HTML then you could use iframes to suck info from footer/header.html files.


Advertisement