Помогите понять пожалуйста! Мне нужно вытянуть каждую кнопку с масива отдельно приблизително так: <li><a class="p-r-0" data-text="Login">{include file='links.element.tpl' module='account/register' tex - вопрос №2878183

Подключаю меню:
{include file='links.tpl'
elements=[
['index', 'Main'],
['news', 'News'],
['cabinet', 'Cabinet', 'skip'=>!_uid()],
]
}
файл 'links.tpl' содежыт :

{foreach from=$elements item=e}
{if !$e.skip}
{include file='links.element.tpl' module=$e[0] text=$e[1] text2=$e[2] text3=$e[3] count=$e.count params=$e.params}
{/if}
{/foreach}
файл links.element.tpl содержыт:

<a href="{_link module=$module}{if $params}?{$params}{/if}"{if ($module == $tpl_module) or ($module == $tpl_vmodule) or $current} class=«current»{/if}>
{$text}
{if $text2}
<span>{$text2}</span>
{/if}
{if $count > 0}
<b><sup>{$count}</sup></b>
{/if}
</a>
18.05.18
0 ответов
Ответов пока нет

Дима

Сейчас на сайте
Читать ответы

Павел Викторович

Читать ответы
Посмотреть всех экспертов из раздела Технологии > PHP
Пользуйтесь нашим приложением Доступно на Google Play Загрузите в App Store