|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I want to make a site that is consistant throughout all the pages. By this
I mean I want a uniform top and side where I can have a banner and a navigation bar. I looked at using templates, but once you make the template and start using it then if you wanted to make a change to lets say the table size of your navigation bar then you have to do it for each page. What I want to be able to do is make a page using tables. Then make all my page using these tables and the way they are sized and formated. Then if I want to make a change to lets say a table size of my navigation bar then I would like to only have to do it in one place and all the pages would change. Is there a way to do this? Or is this still a pipe dream? |
|
#2
|
||||
|
||||
|
This could be done easily enough, through php and the use of objects.
You could build a simple table object that holds all of your formatting inside of the object. Then have each page use that object to create a table. When you change something in the object definition, it would filter down throughout each page that uses the object. This is just one way, I am sure there are plenty of others out there, it is just a point of finding them. |
|
#3
|
|||
|
|||
|
this can easily be done using include files.
|
|
#4
|
||||
|
||||
|
How about being a little more descriptive in your help.
|
|
#5
|
|||
|
|||
|
It can be done easily using SSI
Code:
<html> <!-- the usual <head> stuff --> <body> <table> <!-- Add table formatting data, col/row sizes etc. as needed ---> <tr><td colspan="2"> <!--#include file="head.html" --> </td></tr> <tr> <td><!--#include file="side.html" --></td> <td> <!-- Everything else --> </td></tr> </table> </body> </html> The data inside head.html and side.html will be inserted exactly as it is into the code. The server must have SSI enabled, of course. In most cases, you'll have to rename your files to .shtml . Have a lot of fun ...
__________________
PHP manual | MySQL manual | Apache docs | Linux Documentation Project | Free Software Foundation Smart Questions HOWTO | PHP security | PHP FAQ | Posting HOWTO Wikipedia | English dictionary | Google | News | RFCs Thus Spoke Zarathustra | A Skeptic's Guide to Christianity | Project Gutenberg | Skeptic's Annotated Bible ParEcon | Marxists Internet Archive | The Memory Hole | Landover Baptist | DHMO Research Universal Declaration of Human Rights | UN Charter | Geneva Conventions Sinfest | Chopping Block | Filthy Lies | Bob the Angry Flower | How to Shoot Yourself In the Foot |
|
#6
|
|||
|
|||
|
and more samples
<table width="100%" border ="0"> <tr><td width="150"> <!--Menu--> <a href="<? echo $PHP_SELF?page=page1; ?>">Page 1</a> <a href="<? echo $PHP_SELF?page=page2; ?>">Page 2</a> <a href="<? echo $PHP_SELF?page=page3; ?>">Page 3</a> </td> <td> <? if ($page) { include(basename($page.".php"); } else { include(basename("homepagetxt.php"); } ?> </table> I use basename for security reasons, otherwise anyone could specify $page to be anything and open any file on my url. I use includes in all my sites http://linux-girl.com |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > How to make consistant site? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|