1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Using layout for multiple pages

Discussion in 'Web Design & Development' started by luineril, Oct 15, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. luineril

    luineril Thread Starter

    Joined:
    Sep 23, 2007
    Messages:
    9
    I was wondering if there is some way to import HTML code into different pages? I'm working on a layout right now and it uses a lot of tables. Because the same layout is going to be used for many different pages, I was wondering if there was some way to keep the text in an external file, then import it into each different page. I don't want to get into using iframes because in past experiences they've been a bit finicky. I guess that if worse comes to worse, I can try to use CSS for everything, but if there is a way to import code I'd like to know it.

    Thanks for taking the time to read!
     
  2. maneetpuri

    maneetpuri

    Joined:
    Oct 14, 2008
    Messages:
    135
    Hi,

    If you are using dreamweaver you can create templates and then you will be able to import the common HTML code in which all pages you need.

    Otherwise if you are going to use PHP or ASP or ASP.NET or any other scripting language then you can create include files to store the HTML that needs to be repeated in various pages.

    Hope this helps!

    Cheers,

    ~Maneet
    LeXolution IT Services
    Web Design Services
     
  3. luineril

    luineril Thread Starter

    Joined:
    Sep 23, 2007
    Messages:
    9
    I'm not using Dreamweaver, so I guess it's time for some PHP! Thanks for the advice.

    I actually tried some simple PHP out last night (Hello world!), but I couldn't get anything to show up on the pages. I think that the problem is that nothing's actually online yet - I'm just testing the pages from my computer. Would that mess things up, or am I just getting the code wrong?
     
  4. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    PHP is processed by a server, and then outputted to the browser in the form of text and html. To test PHP code on your home computer (if you're using Windows), you'll need two things.

    1, A server on your computer.
    2, PHP installed on the server.

    Or you could just upload the files to your website everytime you wanna test them, and have your host's server read the PHP.
     
  5. luineril

    luineril Thread Starter

    Joined:
    Sep 23, 2007
    Messages:
    9
    Got it. Thank you both for your help!
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Solved Using layout
  1. izzyburrr
    Replies:
    2
    Views:
    409
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/759320

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice