A
A
auspn2017-07-04 17:21:55
PHP
auspn, 2017-07-04 17:21:55

How to bold the last element in smarty?

Hello. The breadcrumb template contains the following line

<a href="{$e.url}">{$delimiter_left}{if $allow_tags}{$e.name|htmlspecialchars_decode}{else}{$e.name|htmlspecialchars_decode|strip_tags}{/if}{$delimiter_right}</a>

which outputs breadcrumbs with a link. Tell me how you can bold the first or last element of breadcrumbs?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
imhuman, 2017-07-04
@imhuman

{if $smarty.foreach / section.crumbs.last}...{/if}
Surely bypassing the array of crumbs is done through foreach or section

N
Nazar Mokrinsky, 2017-07-04
@nazarpc

This needs to be done with CSS, not Smarty

A
Ankhena, 2017-07-04
@Ankhena

First element
Last element
Also, maybe this: :nth-last-child

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question