Search
 
SCRIPT & CODE EXAMPLE
 

HTML

twig last item

{% for elem in arrMenu %}
    {% if loop.first %}
    <div class="topmenu-button first">        
    {% elseif loop.last %}
    <div class="topmenu-button last">        
    {% else %}
    <div class="topmenu-button">        
    {% endif %}
        <a href="{{ elem.url }}">{{ elem.name }}</a>
    </div>
{% endfor %}
Comment

twig last

{{ [1, 2, 3, 4]|last }}
{# outputs 4 #}

{{ { a: 1, b: 2, c: 3, d: 4 }|last }}
{# outputs 4 #}

{{ '1234'|last }}
{# outputs 4 #}
Comment

PREVIOUS NEXT
Code Example
Html :: scrollbar in html div 
Html :: tmp input field set info 
Html :: ipython.display html 
Html :: abbr in html 
Html :: html text 
Html :: floating modal bootstrap 
Html :: Open popup Form using bootstrap modal on button click in asp net c# 
Html :: symfony twig form value 
Html :: include javascript in html 
Html :: spellcheck html 
Html :: figma to html 
Html :: what is anchor tag 
Html :: how to delete a html tag element in react 
Html :: class not working react 
Html :: xss html 
Html :: double range slider html 
Html :: html onload not working 
Html :: html aside tag example 
Html :: how to make text bold in html 
Html :: lucky draw wheel html 
Html :: crear select jsp java 
Html :: func.apply is not a function at HTMLUnknownElement.callCallback 
Html :: html click on link to open text message 
Html :: Title Tag Length Checker 
Html :: html path svg stop 
Html :: difference between index, follow or follow 
Html :: APP_ENV=testing 
Html :: how to display superscript in breadcrumbs in html 
Html :: how to do auto download when you click on a link 
Html :: how to back up disk partision 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =