ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

auto-repeating bunch of images

September 18, 2012 6:20am

Subscribe [1]
  • #1 / Sep 18, 2012 6:20am

    hi there!

    i have a special problem. on the homepage of my website if one special div which is always 80% of the browser-width.
    no i load a varying number of images into this div:

    {exp:channel:entries channel="projekt" orderby="random" search:auf_der_startseite_zeigen="Auf der Startseite zeigen"}
    <div class="project">
    {exp:channel_images:images entry_id="{entry_id}" cover_only="yes"}
    <div class="projectimage215"><a href="http://{title_permalink=projekt/index}">{exp:ce_img:single src="/images/uploads/multiply3pc.gif" height="{image:height:small}" width="{image:width:small}" watermark="{image:url:small}|0,0|100|left,top|0,0|multiply" crop="yes" allow_scale_larger="yes" alt="{title}" title="{title}"}</a></div>
    {/exp:channel_images:images}
    </div>
    {/exp:channel:entries}

    is it possible to repeat these images automatically til the div is “full”?
    and to auto-repeat even more of the images when the size of the browser is changed after that?

    when the window-size gets smaller its no problem to hide the overflow. but how to i get the auto-repeating?
    any ideas?


    thank you in advance!
    matthias

  • #2 / Sep 20, 2012 10:46am

    Kevin Smith

    4784 posts

    Hi Matthias,

    I suppose that all depends on how you want the end result to look. It sounds like you want the images to stay the same size but for more images to be shown when the width of the viewable div is increased. There would be two ways to accomplish this:

    1) Load enough images in so that they’re on the page the whole time, and hide anything that falls outside the div.

    2) Load only enough images to fill the viewable space and use an AJAX call to load new images when the width of the viewable div is increased.

    The 2nd option would certainly work, but it might be a bit complicated to set up, and unfortunately, it’s beyond what I can really help you with here. The 1st option would be easy enough, and you would only be loading a few images outside the viewable div at most, so the cost wouldn’t be terribly high unless you have a really high traffic site.

    Does that help?

  • #3 / Sep 20, 2012 8:15pm

    hi kevin,

    thanks for your reply!
    i basically just wanted to know, if there´s a way, to let ee repeat a given result of maybe some exp:channel:entries-listings.
    like i could say repeat these results ten times, maybe in different orders.

    so that would go into the direction of the first solution: a div where everything is hidden what doesn´t go into that div.


    thank you in advance!

  • #4 / Sep 24, 2012 12:19pm

    Dan Decker

    7338 posts

    i basically just wanted to know, if there´s a way, to let ee repeat a given result of maybe some exp:channel:entries-listings.
    like i could say repeat these results ten times, maybe in different orders.

    You can use multiple channel entries tag pairs and the dynamic=“no” parameter to “repeat”.

    That, combined with option 1 may work a treat.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases