{smarty} question

browsing code of 2.0,6 i found in price.tpl not closed bracket. I inserted some brakes in the code for clear vew. Could someone explain me if it’s normal for smarty to leave non closed brackets and how it should response on that? Thank you!




{if $settings.General.alternative_currency == "Y"}<br />
	{$value|format_price:$currencies.$primary_currency:$span_id:$class:false}<br />
	{if $secondary_currency != $primary_currency}  <------ this { bracket is open and never closed<br />
	{if $class}<span class="{$class}">{/if}<br />
	(<br />
	{if $class}</span>{/if}<br />
	{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true:$is_integer}<br />
	{if $class}<span class="{$class}">{/if}<br />
	)<br />
	{if $class}</span>{/if}<br />
{/if}<br />
{else}<br />
	{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true}<br />
{/if}

the bracket you are showing is closed, if a bracket is not closed smarty will spew forth massive errors, the page will not even load with an open bracket, are you trying to make modifications to this file?



Thanks - Sno

yes, i did a modification but still didnt find closing bracket :stuck_out_tongue:

[quote name=‘deMarchi’]browsing code of 2.0,6 i found in price.tpl not closed bracket. I inserted some brakes in the code for clear vew. Could someone explain me if it’s normal for smarty to leave non closed brackets and how it should response on that? Thank you!





```php {if $settings.General.alternative_currency == “Y”}

{$value|format_price:$currencies.$primary_currency:$span_id:$class:false}

{if $secondary_currency != $primary_currency} <------ this { bracket is open and never closed

{if $class}{/if}

(

{if $class}
{/if}

{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true:$is_integer}

{if $class}{/if}

)

{if $class}
{/if}

{/if} “<------ closed here”

{else}

{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true}

{/if} ```[/QUOTE]



Closed, else the smarty didn’t work without errors.

I see! thanks. went to learn smarty syntax :slight_smile:

More about smarty :

[url]Search Results for "docsv2" | Smarty