Printing group array in views

Support MB Views Printing group array in viewsResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21941
    toni birdtoni bird
    Participant

    Hi, Is it possible in views to print values of a cloned group in different lines like:

    Trator - 1
    Retro-escavadeira - 3
    Trator - 6

    instead of all on the same line like :

    Trator - 1 Retro-escavadeira - 3 Trator - 6

    my array comes out like this:

    Array ( [0] => Trator [1] => Retro-escavadeira [2] => Trator ) Array ( [0] => Array ( [equip] => Trator [equip_qtd] => 1 [_state] => collapsed ) [1] => Array ( [equip] => Retro-escavadeira [equip_qtd] => 3 [_state] => collapsed ) [2] => Array ( [equip] => Trator [equip_qtd] => 6 [_state] => collapsed ) )

    many thanks

    #21943
    toni birdtoni bird
    Participant

    sorry, my array actually come out like this:

    Array ( [0] => Array ( [equip] => Trator [equip_qtd] => 1 [_state] => collapsed ) [1] => Array ( [equip] => Retro-escavadeira [equip_qtd] => 3 [_state] => collapsed ) [2] => Array ( [equip] => Trator [equip_qtd] => 6 [_state] => collapsed ) )

    #21944
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can add a <br> tag after showing each field value to break it in a new line, just like

    {% for clone in post.group %}
        {{ clone.fieldID }}
        <br>
    {% endfor %}
    #21950
    toni birdtoni bird
    Participant

    Hi Long,

    Thanks again for your prompt reply, works like magic.

    cheers

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.