latte icon indicating copy to clipboard operation
latte copied to clipboard

Not possible define tags attributes dynamically with if anymore

Open Kubina1232 opened this issue 3 years ago • 3 comments

Version: 3.0.x-dev

Bug Description

After update to newest version of latte it is no longer possible define HTML tags atributes via if.

Steps To Reproduce

Check attachement code

Expected Behavior

Work as before -> no problem, successful compilation

BUG message

'Unexpected '</div>
   ' (on line 21 at column 18)'

Which corresponds to if in this tag

<input type="text" class="form-control"
                           name="username" id="username"
                           placeholder="{_"Username"}" required="required"
                           {if ($_ENV['ENVIRONMENT']== 'test')}
                               value="test"
                           {/if}
                           >

image image

Kubina1232 avatar Jun 26 '22 20:06 Kubina1232

The problem is somewhere else https://fiddle.nette.org/latte/#ab560f0c17

dg avatar Jun 26 '22 20:06 dg

@Kubina1232 Did you find out where the problem is?

dg avatar Sep 12 '22 22:09 dg

Unfortunately not. I have rewrote it to use variable.

Also now I see it is working locally with dev-master #f446 (so maybe so bug in some master build... who knows)

Kubina1232 avatar Sep 13 '22 09:09 Kubina1232