Re: Template Sigma Help
| From: | Alexey Borzov | Date: | Sat, 30 Sep 2006 16:06:51 +0000 |
| Subject: | Re: Template Sigma Help | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25319@lists.php.net to get a copy of this message | ||
Hi,
Ian Warner wrote:
Ok so took Betrands advice (thanks) and started using the Sigma template: I created the following as a test: wrapper.tpl <!-- BEGIN tr --> <div id="wrapper">12345</div> <!-- END tr --> <p class="skipLink"> <a href="#main" accesskey="2">Skip to main content</a> </p> </div> // Load template file. $tpl->loadTemplatefile('wrapper.tpl'); $tpl->setCurrentBlock('tr'); $tpl->parse('tr'); $page->addBodyContent($tpl->get()); Now from what I gather this should just print out <div id="wrapper">12345</div> - but on the contrary it is printing outYou *really* should consider reading the docs and running the examples. To get the output you desire you should do something along the lines of $tpl->loadTemplatefile('wrapper.tpl'); $tpl->touchBlock('tr'); // since there are no placeholders in block... $tpl->parse('tr'); $tpl->get('tr');