PHPTal

From mediawiki.org

PHPTal-related stuff[edit]

See instead:

Sample parsed php: phptal[edit]

template:

<?xml version="1.0"?> 
<html>
<head>
  <title tal:content="title">
  place for the page title
  </title>
</head>
<body>
  <h1 tal:content="title">sample title</h1>
  <h3 i18n:translate="string:sitetitle">Sample Sitetitle</h3>
  <div tal:content="structure bodytext">Sample Content text</div>
</body> 
</html>

php:

<?php require_once "GetText.php";
// ------------------------------------------------------------------------------
// This code was generate by PHPTAL based on the template source file :
// /usr/local/lib/wikipedia/templates/davinci.pt
// ------------------------------------------------------------------------------
                                                                                                                                                                       
function tpl_0_7_0_11a65262c64959614a8a31be1e6c4d4d(&$__tpl__)
{
    $__ctx__ =& $__tpl__->getContext();
    $__out__ = new PHPTAL_OutputControl($__ctx__, $__tpl__->getEncoding());
    $__ctx__->set("repeat", array());
    if (! $__tpl__->_headers) {
        $__tpl__->_headers = '<?xml version="1.0"?>
';
    }
    $__out__->writeStructure('<html>
<head>
  <title>');
    // TAG title AT LINE 4
    $_src_tag = "title"; $_src_line = 4;
    $temp_0 = $__ctx__->get("title");
    $__out__->write($temp_0);
    $__out__->writeStructure('</title>
</head>
<body>
  <h1>');
    // TAG h1 AT LINE 9
    $_src_tag = "h1"; $_src_line = 9;
    $temp_1 = $__ctx__->get("title");
    $__out__->write($temp_1);
    $temp_3 = "sitetitle";
    $__out__->writeStructure('</h1>
  <h3>');
    $temp_2 =& $temp_3;
    $__out__->pushBuffer();
    $__out__->writeStructure('Sample Sitetitle');
    $__out__->popBuffer();
    $__out__->writeStructure($__tpl__->_translate($temp_2));
    $__out__->writeStructure('</h3>
  <div>');
    // TAG div AT LINE 11
    $_src_tag = "div"; $_src_line = 11;
    $temp_4 = $__ctx__->get("bodytext");
    $__out__->writeStructure($temp_4);
    $__out__->writeStructure('</div>
</body>
</html>
');
    return $__out__->toString();
}
?>