Re: Help requested - using HTML_Template_Sigma
| From: | Alexey Borzov | Date: | Wed, 25 Jun 2003 06:06:22 +0000 |
| Subject: | Re: Help requested - using HTML_Template_Sigma | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6223@lists.php.net to get a copy of this message | ||
Hi!
Stephen Torri wrote:
------------------------------ meta.inc.php3 ------------------------------ <?php function generate_meta ($tpl) { $tpl->setCurrentBlock('meta'); $text = "<meta name=\"description\" content=\"Personal web page of Stephen A. Torri\">"; $tpl->setVariable('meta_info',"Foo"); $tpl->parseCurrentBlock('meta'); } ?> Yet the resulting HTML code does not have the 'meta' tag line in it. I need assistance or a tutorial/howto page. What is wrong with this code?Well, you do need assistance but it has nothing to do with Sigma. ;] You should declare your generate_meta() like this: function generate_meta(&$tpl) {
...} Currently you are passing a *copy* of $tpl, and when you assign a variable to that, the original object is unaffected.