[Sorry for my bad english]
I'm trying to make my php dynamically add to my template to call the masterpage block. Below is my current show how the template code and masterpage.
------------------- default.tpl -------------------------
<!-- default.tpl -->
<!doctype html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<title>Project</title>
</head>
<body>
<div class="container">
{block name="content"}{/block}
</div>
{block name="javascript"}{/block}
</body>
------------------- index.tpl -------------------------
{extends file="default.tpl"}
{block name="content"}
Hello World
{/block}
------------------- index.php -------------------------
$this->smarty->extends('default.tpl'); //I don't know if is possible do something like this
$this->smarty->blocks('javascript',array('//cdn.jquery.com')); //I don't know if is possible do something like this too
$this->smarty->display('index');