Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    101
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Is it easy to convert to using a template?

    I have finally built my site!
    www.FamilyFunMagic.com
    Not the greatest, but there it is!
    Big thanks to all here who helped me!

    Along the way, I copied the header and CSS and menu and bottom links codes into every page! As I'm doing this, I'm thinking: "There's _got_ to be a way to construct a template from all of this that I can simply insert <body> stuff! 'Cause if I have to change anything, I have to do it on every page!"

    The CSS I know can go into an external file - I just didn't do it right then as I was banging out the pages. But what about the header graphic, the menu, the bottom links, and other stuff?

    I'm sure there's a great tutorial out there.
    Can I get a drop-kick in the right direction, please?
    Ed

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    Thanked 727 Times in 721 Posts
    Easiest, if your server supports php, is to use php includes. Not quite a template, but same effect...

  • #3
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Server side includes ARE the way to go. If you are using Dreamweaver, it has a built in template feature as well. You can define a standard template and create "editable" regions to change content or whatever you want.

  • #4
    Regular Coder
    Join Date
    Jan 2010
    Posts
    101
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Well, I am using a bit of php on one page, so I think I can safely assume my host supports it.

    I had looked at includes for something else - looks like I need to revist that.

    Thanks to both of you!
    Ed

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    php includes are very simple:

    PHP Code:
    <?php include("yourFilename.extension"); ?>
    remember though, you have to use .php as the file extension for your pages as well.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •