...

View Full Version : Create Template?



dofdiamond
01-25-2012, 12:10 PM
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.

devinmaking
01-25-2012, 12:12 PM
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

dofdiamond
01-25-2012, 01:46 PM
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.

KuriosJon
01-25-2012, 02:00 PM
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

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

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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum