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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
  1. #1
    Member screenweb's Avatar
    Join Date
    May 2003
    Location
    Surrey, UK
    Posts
    89
    Member #
    1452
    I usually use includes to form my templates, and I seem to remember a friend telling me another simple template system - Its about 10 lines of code and basically you implement it on a page(With graphics on), where you want the text (Which is on another plain HTML page) to be displayed.

    You can access the pages with this method:
    http://www.thedomainname.com/index.php?page=contact

    index.php has the graphics on

    contact.htm has the contact information on.

    I'm assuming this is another type of include, no idea. Can any one help?

    :bandit:

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    It's just a sample link.

    Look at the tutorial here. You can also use the far more powerful, far more complex "Smarty" templates (I'm guessing a Sourceforge project).
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Member screenweb's Avatar
    Join Date
    May 2003
    Location
    Surrey, UK
    Posts
    89
    Member #
    1452
    I dont want to use them. It only needs to be simple, for a tiny site. I suppose I could look at them for another BIG site I run.

    Do you know the code?

  5. #4
    Senior Member [Li] Brad's Avatar
    Join Date
    Oct 2003
    Location
    Saskatoon, Canada
    Posts
    578
    Member #
    3689
    Hello

    I'm not sure what you are talking about, your post is hard to follow, but are you meaning
    PHP Code:
    <?php include($page .  "")?>
    ?

    [Li] Brad
    "Art strives for form, and hopes for beauty." - George Bellows

  6. #5
    Member screenweb's Avatar
    Join Date
    May 2003
    Location
    Surrey, UK
    Posts
    89
    Member #
    1452
    nope

    The system is used on my friends site here:

    http://www.thisishosting.net

    Lets use this page as an example:
    http://www.thisishosting.net/index.php?page=support

    The Header, and table frame and graphics are on index.php the support content is on:
    http://www.thisishosting.net/support.htm

  7. #6
    Senior Member [Li] Brad's Avatar
    Join Date
    Oct 2003
    Location
    Saskatoon, Canada
    Posts
    578
    Member #
    3689
    Correct me if I am wrong, but isn't that just a simple include?

    index.php:
    -HEADER-
    -TABLE CODE-
    <?php include("support.htm")?>
    -FOOTER-

    I think that is what it is, I use those page includes all the time.

    [Li] Brad
    "Art strives for form, and hopes for beauty." - George Bellows

  8. #7
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    What are you asking for?

    Are you asking about having the content loaded into a template using URL variables (www.domain.com/index.php?id=1)?
    JR

  9. #8
    Member screenweb's Avatar
    Join Date
    May 2003
    Location
    Surrey, UK
    Posts
    89
    Member #
    1452
    No
    as it apply to all pages

    there is only one php file (index.php)

    if you do index.php?page=support, it will display the support.htm content
    if you do index.php?page=faq it will display the faq.htm etc...

  10. #9
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    I understand...

    What you are talking about is bad for search engines, I think. You would do it like so...

    PHP Code:
    // HTML code for header and nav here
    <?php
    $page 
    $HTTP_GET_VARS['page'];
    include(
    $page.".html");
    ?>
    //HTML code for footer here
    That would be a very simple way to do it. You would have to make sure that the filename and file extension is the same as the URL variable.
    JR

  11. #10
    Member screenweb's Avatar
    Join Date
    May 2003
    Location
    Surrey, UK
    Posts
    89
    Member #
    1452
    Perfect, thats the one

    Maybe this should be a tutorial??


Page 1 of 2 1 2 LastLast

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
  •  
All times are GMT -6. The time now is 07:31 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com