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 :: image from website in whatshapp with meta tag 
Html :: responsive about us page html code 
Html :: html card 
Html :: bootstrap notifications 
Html :: navigate to a html link in django python 
Html :: disable lazyload image smush 
Html :: HTML <ins 
Html :: html meta boilerplate 
Html :: bulleted list html 
Html :: in form right to left html 
Html :: email and button bootstrap 
Html :: mongodb playground 
Html :: flutter html parser 
Html :: bold text html 
Html :: html5 fonts 
Html :: required option for select tag 
Html :: simple website using html and css 
Html :: html input name and value and id 
Html :: delete html file from git 
Html :: xss html 
Html :: text input is geeting empty space at start 
Html :: html stands for what 
Html :: ubuntu 16.04 vmware 
Html :: map box hyperlink 
Html :: how to make clicking button send you down to a certain section of page html 
Html :: nunjucks escape brackets 
Html :: divide in single rows html using div 
Html :: equal symbol expected spring form 
Html :: x and y in javascript 
Html :: label input mdn 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =