Pagination
Posted
#7062
(In Topic #1925)

Standard member

It shows a lot of images. I'd like it to only show 100 images at a time, instead of over 1000 on a single page. Is there a way to do this with a comcode or tempcode?
Posted

Site director

Looks like it could just be a gallery?
You can embed a gallery using the main_gallery_embed block, and it supports pagination.
Or maybe you don't want to do that as you want them fully embedded, no thumbnailing?
That should still be possible with the main_gallery_embed block, but would be a little more work.
You'd need to pass a guid parameter to the block. Let's suppose you set the guid to 'embedded_gallery'. And you put the images in a gallery named 'some_gallery_name'.
Code
[block="some_gallery_name" pagination="1" guid="embedded_gallery"]main_gallery_embed[/block]
Then you'd need to edit the GALLERY_IMAGE template to put out different content based on the guid.
Code
{+START,IF,{$EQ,{_GUID},embedded_gallery}}
<img alt="{TITLE}" src="{FULL_URL*}" />
{+END}
{+START,IF,{$NEQ,{_GUID},embedded_gallery}}
(original contents of the template goes here)
{+END}
I just tested with a test image in a gallery and this seems to work (I didn't test the pagination but I don't see why that wouldn't work).
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
1 guest and 0 members have just viewed this.