|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (9 bit)
|
i am currenlty trying to build a web sites. i am goinig to build a sites with a new of web pages. one of the things i relize that it is very troublesome if every time i have to hard code all the web pages and update. i wonder is there a way that i can set up a teamplate page. and every time i want to use the page i just use that and change the content according. is there a way to do. Can any one show me or give me some hint. Thank you
|
|
|
|
|
|
#2 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
Generally you would build a page with php or ssi. Usually you would have a header, a footer, a left-menu and the body. The only thing that changes is the body. So the other parts would just be one file for each section. You would just include it in your pages. For php, it is quite simple like this:
PHP Code:
|
|
|
|
|
|
#3 |
|
Member (9 bit)
|
hei for every page i create i just use the above php code to generate the nessary page right. also what is the .inc file. and do i put all the html code in there and also if i want to create a table and everytime i want to generate a table and just want to change the title of it how can i do it
|
|
|
|
|
|
#4 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
The .inc file is just a file. All the .inc ending means is that it is an include file. Since this file is never parsed by itself, it is included with the other file, it can really be any extension that you want it to be. Take your webpage, cut it into parts. The header (top part) would become header.inc., the footer, footer.inc, etc. Put all of these together and you have your page.
|
|
|
|
|
|
#5 |
|
Member (9 bit)
|
so the include function is the funtion in php right. can i do it in html code or in javascript code. is it possible to do it or in asp.
|
|
|
|
|
|
#6 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
You can also do it using Server Side Includes . I have never seen it done with JS but it probably could. Keep in mind that JS is a client side language which can be turned off by the user. This means that your page wouldn't work. You can do it with ASP also.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|