Re: [SMARTY] Problem - templates parsed only partially
| From: | messju mohr | Date: | Fri, 06 Jun 2003 09:01:27 +0000 |
| Subject: | Re: [SMARTY] Problem - templates parsed only partially | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9654@lists.php.net to get a copy of this message | ||
in your first snippet you use "<!--{" but in the others you use "<--{".
i think that's the source of you problems.
HTH
messju
On Fri, Jun 06, 2003 at 11:09:16AM +0300, Andrei Verovski wrote:
> Hi,
>
> I have very strange problem with templates. In short, only first few
> smarty variables are being substituted correctly, other remain unparsed
> for unknown reason.
>
> I have changed smarty delimiters with '<!--' and '-->' in order to
> not
> confuse HTML editor with "{}" and do not recognize smarty blocks as
> syntax error. Aslo, I have turned force_compile to true and caching to
> false.
>
>
> Here is snippets of template (from the SAME template file):
>
>
> ******* snippet 1 - works ******
> <tr>
> <td class="PlainTextRight">Company/Org.</td>
> <td width="27%" class="PlainTextLeft"><input
> name="form_contacts_description" value
> ="<!--{$smarty_contacts_description}-->" type="text"
> size="32"
> maxlength="128"></td>
> <td width="14%" class="PlainTextRight">Reg./VAT#</td>
> <td width="42%" class="PlainTextLeft"><input
> name="form_contacts_reg_no" value="<!--{$smarty_contacts_reg_no}-->"
> type="text" size="32" maxlength="128"></td>
> </tr>
>
> ******* snippet 2 - does not work ******
> <td class="PlainTextLeft"><select name="form_contacts_profile">
> <--{$smarty_contacts_profile}-->
> </select> </td>
>
> ******* snippet 3 - does not work ******
> <td class="PlainTextRight">e-mail #1</td>
> <td class="PlainTextLeft"><input name="form_email1"
> value="<--{$smarty_contacts_email1}-->" type="text"
> size="32"
> maxlength="128"></td>
>
>
> ******* snippet 1 parse - everything is OK ******
> <tr>
> <td class="PlainTextRight">Company/Org.</td>
> <td width="27%" class="PlainTextLeft"><input
> name="form_contacts_description" value ="<?php echo
> $this->_tpl_vars['smarty_contacts_description']; ?>" type="text"
>
> size="32" maxlength="128"></td>
> <td width="14%" class="PlainTextRight">Reg./VAT#</td>
> <td width="42%" class="PlainTextLeft"><input
> name="form_contacts_reg_no" value="<?php echo
> $this->_tpl_vars['smarty_contacts_reg_no']; ?>" type="text"
> size="32"
> maxlength="128"></td>
> </tr>
>
> ******* snippet 2 and 3 parse - smarty variables are not substituted
> ******
> <td class="PlainTextLeft"><select name="form_contacts_profile">
> <--{$smarty_contacts_profile}-->
> </select> </td>
> <td class="PlainTextRight">Relationship</td>
>
> <td class="PlainTextRight">e-mail #1</td>
> <td class="PlainTextLeft"><input name="form_email1"
> value="<--{$smarty_contacts_email1}-->" type="text"
> size="32"
> maxlength="128"></td>
>
>
> Here are testing code used to render template:
> $smarty_contacts_data -> assign('id', '101');
> $smarty_contacts_data -> assign('smarty_contacts_description', 'Apple');
> $smarty_contacts_data -> assign('smarty_contacts_reg_no',
> 'NR123456789');
> $smarty_contacts_data -> assign('smarty_contacts_profile',
> '<option>Bank</option> <option>Publishing House</option>
> <option>Repro</option>');
> $smarty_contacts_data -> assign('smarty_contacts_email1',
> 'mail_one@apple.com');
>
> Only first 3 smarty variables are substituted, other remain unchanged.
>
>
> Thanks in advance for any suggestion.
>
>
> *********************************************
> * Best Regards --- Andrei Verovski
> *
> * Personal Home Page
> * http://snow.prohosting.com/guru4mac
> * Mac, Linux, DTP, Development, IT WEB Site
> *********************************************
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php