Template variables with longer names not propagating to included files

10 views
Skip to first unread message

Bradley Slavik

unread,
Nov 7, 2013, 2:05:30 PM11/7/13
to smarty-d...@googlegroups.com
Dear Smarty Developers,

I have this code in one of my templates:

{assign var='inactiveReasonName'  value='i_inactive_reason_id'}
{assign var='inactiveReasonType'  value='i'}
{assign var='inactiveReasonValue'   value=$id->inactive_reason_id}
V2{$inactiveReasonValue}
<span id='i_inactive_reason_span'>
    {include file='InactiveReason.tpl'}
</span>

And in the included file there is a line like this:
V3{$inactiveReasonValue}

Inside this template file, the variable $inactiveReasonValue is correct.
Inside the included file, the variable $inactiveReasonValue is 0 (the digit zero)

If I shorten the name in this file and the included file to $inactiveReasonVal
everything works fine. Has anyone else run across this problem?

Bradley Slavik

uwe.tews

unread,
Nov 7, 2013, 3:13:40 PM11/7/13
to smarty-d...@googlegroups.com
I can't reproduce the problem. 
Which version of Smarty did you use?
Reply all
Reply to author
Forward
0 new messages