Answer the question
In order to leave comments, you need to log in
How to output array element in Smarty?
Hello! There is this Smarty template:
{if $smarty.get.oid}
{include file=fend.catalog__object__view.tpl}
{else}
{catalog__define_sid sid=$sid assign=csid sss=$sss}
{if $csid}
{counter start=0 print=false}
<div id="navi_3">
{foreach from=$sss[$sid] item=i key=key}
{counter assign=lnk_cnt}
<a href="{$php_self}?sid={$i->g('uid')}&csid={$i->g('id')}{if $smarty.get.type}&type={$smarty.get.type}{/if}"{if $i->g('id') == $csid} class="selected"{/if}{if $i->g('id') == $csid || $i->g('oc') == 0} onClick="return false;"{/if}{if $i->g('oc') == 0} class="disabled"{/if}>{$i->g('tit')} <span class="s1">({$i->g('oc')}) <b>ЗДЕСЬ ЭЛЕМЕНТ МАССИВА</b></span></a>
{if $lnk_cnt != count($sss[$sid])}
<span class="s2">>></span>
{/if}
{/foreach}
</div>
{catalog__load__by_sid sid=$csid assign=os}
{else}
{if $sid==94 || $sid==95 || $sid==67 || $sid==68}
{catalog__load__by_sid sid=$sid assign=os}
{else}
{catalog__load__by_ss ss=$sss[$sid] sid=$sid assign=os}
{/if}
{/if}
{if $os}
{catalog__option__load__all assign=opts}
{catalog__option__value__load__all assign=ovs}
{catalog__image__load__by__objects objects=$os assign=is}
{catalog__sync os=$os opts=$opts ovs=$ovs is=$is}
{table_colomns from=$os item=i tpl='fend.catalog__object__list__item.tpl' columns=2 table_styles='id="cat"' td_styles='class="cat_item"'}
{else}
<div style="padding: 10px;">{lang v=admin.catalog__no_items}</div>
{/if}
{/if}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question