Web Hosting Talk







View Full Version : How do you use one layout for everything?


teth
06-06-2003, 02:48 AM
How do you? For example, for diary-x.com, I make a layout that applies to everything. Whenever I want to write something, the words will appear in a specific area in the layout. Thus, all the pages have the same layout every time. Now, when I want to change the layout, I can just create a new template and apply it to all the old entries. I don't have to go back in to re-work all of them page by page. I am only good with HTML. So, when I want to change something, I have to go to every single page to add the codes in. How do I have one template for all the pages? Am I making any sense here? Sorry for my horrible wording...

sitekeeper
06-06-2003, 02:58 AM
The best way would be using php/mysql or any content manager.
You could use a WYSIWYG html editor, there are some free ones like Firstpage.

TalonKarrde
06-06-2003, 04:06 AM
You could also use iframes.

amusive.com
06-06-2003, 04:09 AM
Use SSI.
Or learn Perl and use HTML::Template.

case
06-06-2003, 04:37 AM
I prefer "generic branding", which in this case relies on php. Basically you have a php file which calls different content references such as header,body,footer...but really it endless. I prefer this method because its much cleaner then sifting thru pages of html. Check this tutorial out, its very easy and im sure it will help.

http://www.phpbeginner.com/columns/ray/branding

case
06-06-2003, 04:38 AM
ps, if you need help with it...ill be more then glad to assist.

amusive.com
06-06-2003, 04:42 AM
"Generic branding" just looks like a way to do SSI in php. Or am I missing something?

blue27
06-06-2003, 06:23 AM
Originally posted by TalonKarrde
You could also use iframes.

Iframes don't show up in Netscape do they?

Phrozen
06-06-2003, 06:27 AM
Originally posted by blue27
Iframes don't show up in Netscape do they? From 6.0 and up as long as height and width attributes are specified. I'm sill not too fond of them though.

PHP includes would be my first choice for something of this nature.

Xshare
06-06-2003, 09:57 AM
Dreamweaver has a "Templates" function. You choose which part of the page is "content" and what is "template" and you can just edit the template and it applies to all the pages. It's bad though. It funks up your code.

case
06-06-2003, 10:27 AM
Originally posted by amusive.com
"Generic branding" just looks like a way to do SSI in php. Or am I missing something?

did you bother to read the entire article...

does this look like ssi....not to mention, you cant embed ssi into a php file. You have to use php to produce ssi like features.....


<?php

require_once( 'config.php' );

function Main()
{
/* Including the Header section */
include( 'template_prepend.php' );

echo '<table valign="top" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td class="tdhead">';
echo 'WELCOME';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="tdbody">';
echo 'PHPBUGTRAX is a bug tracking system developed with PHP.';
echo '</td>';
echo '</tr>';
echo '</table>';

/* Including the Footer section */
include( 'footer.php' );
}

Main();

?>

i would probably stay away from perl, being it was never intended for web use anyways....

teth
06-06-2003, 12:36 PM
Thanks to all who pitched in to help. I will definitely check out the php site and the Dreamweaver one, since I use that program anyway.

Thanks again. If I need any help, I'll be back. :D

amusive.com
06-06-2003, 03:23 PM
How is that PHP at all different than including a header and footer ssi file though?

Seeing as he didn't ask about PHP I don't see how it's relevant if or if not you can use SSI in PHP.