HTML Template Help

edited February 2010 in Internet & Media
Hi,

Anyone got any idea on this? Would be greatly appreciated!

Im building a website with dreamweaver CS4, Is there anyway of getting the text on a page automatically from a template file. For example, say the text at the top of the index.html was changed from "Your text here" to "My site" it would update on every page using that template.

Is this done through CSS? my knowledge of website language is limited, i can get by on CSS, PHP, JavaScript and im fairly good at HTML.

Currently whenever i change a link or text on my index page, i then have to change all other pages, and with my amount of pages now approaching 20+ i dont really want to keep having to do this.

I'm hoping someone with a bit more webby-knowledge can help me please!

Thanks in advance!

Comments

  • AlexDeGruvenAlexDeGruven Wut? Meechigan Icrontian
    edited February 2010
    If you can do PHP, why not create a default header that then gets included at the beginning of every page load?

    You'd have to use index.php, rather than index.html, but that's relatively trivial.
  • edited February 2010
    Thanks for the fast reply, PHP is relatively new to me, but i have been able to get it to grab information and send an email to my account and so on.

    Will that be a problem using index.php if it has all been done as html? will the whole site need re-doing?
  • edited February 2010
    ok, ive tried putting the index.php on my server and it wont load the website anymore, get a 500 - internal server error?
  • edited February 2010
    Ah ive worked it out.

    Something like:

    [php]
    <?php include("filename.html); ?>
    [/php]

    thats done it, thanks!
Sign In or Register to comment.