Ребят подскажите кто-нибудь, какое условие использовать что бы обернуть код в доп class
если просто в шаблоне так прописать то срабатывает не в оболочку а дублируется
заранее спасибо
Код:
<условие>
мой class
<xf:macro name="node_item"
arg-node="!"
arg-extras="!"
arg-nodeType="!"
arg-nodeLink="!"
arg-defIcon="!"
arg-children="!"
arg-selected="!"
arg-selectedParents="!"
arg-nodeIcons="!">
<div class="nodeList-itemRow nodeList-itemRow--{$nodeType} nodeList-itemRow--{$node.node_id} nodeList-itemRow--depth{{ $node.depth + 1 }}{{ $extras.hasNew ? ' nodeList-itemRow--unread' : ' nodeList-itemRow--read' }}{{ $node.node_id == $selected ? ' is-selected' : '' }}">
<a href="{{ link($nodeLink, $node) }}"
class="nodeList-link"
{{ ($node.description && property('tc_nlw_itemDescription')) ? 'data-xf-init="tooltip" ' . 'title="' . $node.description . '"' : '' }}>
<xf:if is="$nodeIcons">
<xf:if is="is_addon_active('TC/CustomNodeIcons') && $node.tc_cni_icon_type != ''">
<xf:set var="$iconValue"
value="{{ ($node.tc_cni_unread_icon_value && $extras.hasNew) ? $node.tc_cni_unread_icon_value : $node.tc_cni_icon_value }}" />
<xf:if is="$node.tc_cni_icon_type == 'fa'">
<xf:fa icon="{$iconValue}" class="nodeList-link--icon" />
<xf:elseif is="$node.tc_cni_icon_type == 'img'" />
<img src="{{ base_url($iconValue) }}" class="nodeList-link--icon" />
</xf:if>
<xf:else/>
<xf:fa icon="{{ $nodeIcons.{$nodeType} ?: $defIcon }} nodeList-link--icon" />
</xf:if>
</xf:if>
<span class="nodeList-link--title">{$node.title}</span>
</a>
<xf:if is="$children is not empty">
<xf:macro name="node_list_toggler"
arg-node="{$node}"
arg-selected="{$selected}"
arg-selectedParents="{$selectedParents}" />
</xf:if>
</div>
</xf:macro>
закрывающий тег класса
<условие>
если просто в шаблоне так прописать то срабатывает не в оболочку а дублируется
Код:
<div class ..... >
<xf:macro name="node_item"
arg-node="!"
arg-extras="!"
arg-nodeType="!"
arg-nodeLink="!"
arg-defIcon="!"
arg-children="!"
arg-selected="!"
arg-selectedParents="!"
arg-nodeIcons="!">
бл бла бла
</xf:macro>
</div>
заранее спасибо
Последнее редактирование:
