SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: How do I individualise my pages when using the INCLUDE function?

  1. #1
    SitePoint Enthusiast thenetmaker's Avatar
    Join Date
    Sep 2004
    Location
    N.Ireland
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool How do I individualise my pages when using the INCLUDE function?

    The majority of my website pulls in a header using the INCLUDE function (php based) so my keywords and title will always be the same.

    The bulk of the site content is called through one of 4 pages so how do search engines read my content when it is held in the database and not as individual webpages?

    www.bigbluesquid.com

    Ta muchly!
    Mike )-@

  2. #2
    SitePoint Evangelist speda1's Avatar
    Join Date
    Jan 2002
    Posts
    550
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Within each page set a variable before you call the include:
    $title = "Your title here";

    And then in the include file something like this:
    <title><?php echo $title; ?></title>

  3. #3
    SitePoint Addict
    Join Date
    Sep 2004
    Location
    victoria
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or you can do a function

    function header($title, $meta, $description) {
    print <<<EOF
    ...
    <title>$title</title>
    ...
    EOF;
    }

    you get the picture

Bookmarks

Posting Permissions

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