Cytat(Crozin @ 18.01.2009, 00:30:05 )

W kodzie szablonu nie stosuj cały czas print, print, print. Po co? Daj to jako zwykły kod HTML, a tam gdzie chcesz wyświetlić zmienną PHP dajesz
Moim zdaniem nie jest to efektywne ... Jak ma milion zmiennych to póżniej idzie człowieka szlag trafić w znalezieniu czegoś ... a na pewno mnie ...
Ja preferują metodę ...
<?php
<meta name="robots" content="' . $robots . '" />
<meta name="description" content="' . $description . '" />
<meta name="keywords" content="' . $keywords . '" />';
?>
Ja bym rozwiazanie @phpion zrobił jeszcze inaczej ...
templates/header.tpl<?php
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'; print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">'; print '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />'; print '<meta name="robots" content="' . $robots . '" />'; print '<meta name="description" content="' . $description . '" />'; print '<meta name="keywords" content="' . $keywords . '" />'; print '<link rel="shortcut icon" href="favicon.ico" />'; print '<link rel="stylesheet" type="text/css" href="style.css" />'; print '<title>Untitled</title>'; ?>
templates/footer.tpl<?php
?>
index.php<?php
$robots = 'roboty';
$description = 'opis';
$keywords = 'slowa kluczowe';
include 'templates/header.tpl';
include 'templates/index.tpl'; // lub include 'modules/index.php';
include 'templates/footer.tpl';
?>