Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
"Show more" button for images

I have a feature that allows users to upload multiple images. The images are displayed via simple light box. The issue is it displays all of the images and forces users to scroll all the way to the bottom to see the rest of the data. If lots of images are uploaded this can be annoying on small screens. I want to implement a show more button something like this and or just a simple button.

enter image description here

code:

{% if postgallery|length >= 1 %}
    <a class="imggallery-title">Image Gallery</a>
    <div class="row">
        {% for images in postgallery %}
        <div class="col-md-3">
            <a href="{{ images.images.url }}" data-lightbox="image-1">
                <img class="img-thumbnail" src="{{ images.images.url }}" />
            </a>
        </div>
        {% endfor %}
    </div>
    {% endif %}

view:

postgallery = PostImages.objects.filter(post_id=post) 

I understand I could setup and if statement to check to see if there are more than a set amount of posts but im not sure how I would handle the displaying of the rest with a button click

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda