Output image upload field

Support MB Views Output image upload field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29681
    Ole PoetterOle Poetter
    Participant

    Hi,
    I'm in the very beginning in metaboxing.

    I have a image upload field.
    Corrently the output of this file in MB Views is something like this:

    {% for item in post.bilder %}
        <a href="{{ item.large.url }}" class="simplelightbox">    
    <img src="{{ item.thumbnail.url }}" width="{{ item.thumbnail.width }}" height="{{ item.thumbnail.height }}" alt="{{ item.thumbnail.alt }}">
        </a>
    {% endfor %}

    This is working well.
    I#m wondering if there is a way to output (for examplel) 4 images at the same time and add an pagination for the other images.

    Any ideas how to achieve this?

    Kind regards,
    Ole

    #29685
    Long NguyenLong Nguyen
    Moderator

    Hi Ole,

    You might need a lot of PHP code to create pagination, please follow this article to do that
    https://codeblock.co.za/how-to-create-pagination-with-php/
    or this topic https://stackoverflow.com/questions/22145259/simple-pagination-for-foreach-loop/22145442

    MB View does not support inserting complicated logic code as PHP does it works like a template.

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