|
-
BANANARAMA FOFANA
shtml help (server side include problem)
http://www.actvsdei.com/~tutu/temp/test4.shtml
here's what i have now:
Code:
<body bgcolor="#006699">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" height="95%" align="center">
<!--#include file="leftside.txt" -->
</td>
<td width="80%" height="95%" align="center">
<!--#include file="content.txt" -->
</td>
<td width="10%" height="95%" align="center" valign="top">
<!--#include file="rightside.txt" -->
</td>
</tr>
<tr>
<td height="5%" colspan="3" align="center" valign="top">
<!--#include file="bottom.txt" -->
</td>
</tr>
</table>
</body>
content.txt contains the table formatting stuff. this is what it looks like without including content.txt.
what i'd like to do is keep the content (which would be on the .shtml page) separate from the formatting information in content.txt, so that if i change the layout in the future i won't have to go through every page of my website and reformat that particular window. is this possible using shtml?
For example, i don't like the look of the bones around the content window right now, so i want to be able to change how it looks (by modifying content.txt) without screwing up anything i have in the content window.
i'm thinking it might be more elegant to use PHP or something similar, but i'm not too sure if my account is properly set up for that (i get missing file errors when i try to use php-include).
Last edited by tu2thepoo; 12-20-2002 at 03:14 AM.
-
Ursus Arctos Moderatis
I would just take all of the table formatting contained in "content.txt" and leave it in the root file. The only characters that should be left in your "content.txt" file should be "content goes here"
Make sense? If you used PHP for your includes, you could nest includes and makes things a little more modular, but I'm not sure if you really need that type of flexibility right now. Keep it simple if you can.
-
BANANARAMA FOFANA
[edit]
nevermind, i got php-include working. i think i had errors before because i was trying to include .html files (instead of .inc).
this is what i have now:
Code:
<html>
<head>
<?php include "title.inc" ?>
<?php include "meta.inc" ?>
<link href="main.css" rel="stylesheet" type="text/css">
<?php include "scripts.inc" ?>
</head>
<body bgcolor="#006699">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" height="95%" align="center">
<?php include "leftside.inc" ?>
</td>
<td width="80%" height="95%" align="center">
<?php include "contentformat.inc" ?>
</td>
<td width="10%" height="95%" align="center" valign="top">
<?php include "rightside.inc" ?>
</td>
</tr>
<tr>
<td height="5%" colspan="3" align="center" valign="top">
<?php include "bottom.inc" ?>
</td>
</tr>
</table>
<!-- following a tutorial right now -->
<?php
print ("I am the CHICKEN MAN");
?>
</body>
</html>
so how could i go about nesting the includes? this is my first foray into PHP, so i'm still thumbing through the documentation on php.net.
[edit2]
link is now
http://www.actvsdei.com/~tutu/temp/test.php
[/edit2]
Last edited by tu2thepoo; 12-20-2002 at 01:36 PM.
-
BANANARAMA FOFANA
that was a lot easier than i thought
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|