tags:

views:

20

answers:

1

How can I create Master Pages like in ASP.NET using PHP and Smarty?

I want to have several content place holders in the master page and simply fill them with almost big HTML chunks. So I'm looking for a better approach than what I currently have.

$content =<<< eol
    <div id="home">
        <img src="images/jon.jpg" id="left-image" />
    </div>
eol;

$smarty->assign('content', $content);
$smarty->display('index.tpl');
+1  A: 

How about creating multiple templates and usning smarty include?

{include file="somethingelse.tpl"}
cypher