Custom Fields
Re-Envisioned
Support MB Views Printing group array in views

  • Creator
    Topic
  • #21941
    Resolved toni 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #21943
    toni 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 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 bird
    Participant

    Hi Long,

    Thanks again for your prompt reply, works like magic.

    cheers

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