Looper with "load more" option

Hi there,

Thanks for writing in! Regretfully this isn’t a feature offered in Cornerstone. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to subscribe to our One service where we can recommend a script to accomplish this.

Thanks for understanding. Take care!

I’ve requested this recently and they said they’d look into adding it, so it may happen.

2 Likes

Glad to hear that, @JvP

This would give loopers a huge kick. No more ACF or gallery plugins necessary. And you can even add your own functionality like rating, curation etc. to the preview gallery as well. This have only a few of the gallery plugins included and its always a premium feature.
And and and, there would be no fuzz with posts and archives etc… just a simple plain looper.

1 Like

Hey Onrej,

You might want to check out these threads for the time being:


Cheers.

Hi @VRANKOVINA ,

Besides @ruenel’s mentioned thread, you can add counters to display how many images have loaded versus the total available in the category (if that is applicable).

To output that you will need to have two loopers. In the main one, essentially you show something like Loaded {{ looper.count }} out of and right after that you add another nested container for a looper for the category count {{ term.count }}.

In this case the conditions for showing / hiding the Load More button will change a bit to something like {{ looper.count }} != {{ term.count({"term":"ID"}) }}. Use a real term ID instead to make it work, which you can grab from a its link for example.

thx a heap for the hints!

You’re welcome.

This is kinda strange.

First of all.: The twig solution works like a charm.

But.

I use section as the top most element, not div. my looper provider is a row. The reason is the “masonry” option. This works just fine.

As soon as I change the looper provider to div and set everything exactly like for the row. The provider does not provide anything. Hence I can not connect the “load more” button to the provider. This does not really make sense to me.

Hello Ondrej,

Be a Section or a DIV element, as long as the Looper Provider is the Row element, it should work. Check out the demo page I have created. The link is in the secure note below.

Thanks.

copy that. the provider must be a row. But in the “how to” videos above regarding the TWIG solution, the DUDE uses divs…
The prob is, you can’t nest the button into a row without placing it into a column. And as the column is the consumer, where shall I place the button, so its connected to the provider?

The point is, the button “more” should disappear after the last consumer is loaded according to the HOW-TO videos. So placing the button into a row, which isn’t the provider, won’t make this possible? In layman’s words: the connection between the button and the provider isn’t established.

Hey Ondrej,

What you can do is have a structure to something like this:

Section  - Looper Provider
  Row
    Column - Looper Consumer
        /your contents here/

  Row   - Add condition to hide/show this Row
    Column
       /your Button here/

There are several other ways to structure the looper to make sure that the button is inside the Looper Provider, and the Masonry feature of the Row will still work.

Thanks.

ah ok! Thx.

Nope. The looper provider has to be a row. Quote: "as long as the Looper Provider is the Row element, it should work. "

No problem, Ondrej.

Hey John! You lucky bast… :D.
Not so much at my place ;).
Btw. Who’s John?

Not sure who’s John also but glad to hear that.

Johnny Walker perhaps. That would explain the mix up. Cheers :smile:

1 Like

Lol. Got mixed up my replies.

Follow up question: using the TWIG method the page scrolls up each time I hit the “load more” button. Is there any trick how to avoid this?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.