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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create Template?

    I want to add more then 50 pages in my HTML site, and for this reason need to change all pages code manually ( menu and footer ). Its too Typical and time consuming.

    I want solution for this Like Master pages in PHP, .net Possible in HTML.

    or create Template how i Create template?

    Share some serious reply and information with me.

  • #2
    Regular Coder
    Join Date
    Oct 2011
    Posts
    236
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by dofdiamond View Post
    I want to add more then 50 pages in my HTML site, and for this reason need to change all pages code manually ( menu and footer ). Its too Typical and time consuming.

    I want solution for this Like Master pages in PHP, .net Possible in HTML.

    or create Template how i Create template?

    Share some serious reply and information with me.
    you can do this easily in php.

    For instance do a file for header.php and put all header information within the header.

    You then call it in using include("header.php");

    This way you just edit 1 header instead of 50 headers

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re :

    Thanks for Reply, but my site in pure HTML may, call PHP file in HTML.( not html 5 ). If possible How I do share example also.

  • #4
    Regular Coder
    Join Date
    Jan 2012
    Posts
    134
    Thanks
    0
    Thanked 32 Times in 32 Posts
    Your web server most likely supports PHP. To find out try this.

    Create a file named hello.php. In that file, put the following:

    PHP Code:
    <?php

    echo 'hello world';

    ?>
    Then open the page in a web browser. If you see only the text "hello world", then PHP works and is enabled.

    If that works, now create a second file in the same directory as the first file. Name it include_test.php. In that file, put the following:

    PHP Code:
    <?php

    include 'hello.php';
    echo 
    'this is neat';

    ?>
    Now open the second page. You should see the text "hello worldthis is neat".

    That's the basics of PHP includes. Once you understand that, you can create files like header.php and footer.php, then include them on every page. Now to change the whole site you only have to edit one file.


  •  

    Posting Permissions

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