The design is as follows:
<!-- projects list --> {if !empty($userObjects)} <select id="projects-list" tabindex="1" name="project"> {if !isset($selected)}<option value="0">Choose project</option>{/if} {foreach from=$userObjects item=v} <option value="{$v.Id}" {if $selected==$v.Id}selected="selected"{/if} }>{$v.Name} {* if it 1st element *} {if $smarty.foreach.v.index == 0} {if isset($limit)}<br /><span id="projlimit">{$limit}</span> {$currency->sign}{/if} {/if} </option> {/foreach} </select>
as you can see i did
{if $smarty.foreach.v.index == 0}
but everything goes wrong. In this case, all options elements have a limit value of $. How to do it well? I only need the first.
source share