Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member ItalianMike's Avatar
    Join Date
    Nov 2004
    Posts
    28
    Member #
    8321
    I want to use PHP to streamline my site. So I want to take my layout and split it into two halves (header.html & footer.html) then have each individual page request the header and footer via PHP to create the full layout. I don't think this is so complicated, but I'm in the dark about one aspect. That's setting up the head of the header file so that certain information changes accordingly depending on what page you are on. For example the "title" tag would need to change according to what page is loading. Same with certain meta tags.

    I hope I explained myself properly, and I hope someone here can give me some detailed examples of how this is done. I must confess I'm a PHP idiot, I don't know much at all, but I've managed to get a few scripts going in the past.

  2.  

  3. #2
    Senior Member Fallout's Avatar
    Join Date
    Aug 2003
    Location
    Richmond, Virginia
    Posts
    543
    Member #
    2748
    Is you data taken from a database or just hard-coded HTML? If it is a DB-generated page, you can just add a new field that contains the title or use another field in your <title> tag. You would then just have the header.php page insert the right text for each article. If it is only HTML, I would recommend just making a generic title that works for all pages. If SEO is very important to you and the <title> needs to be unique, you will have to create a more complicated system.


Remove Ads

Posting Permissions

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

Search tags for this page

php footer templates

Click on a term to search for related topics.
All times are GMT -6. The time now is 11:37 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com