We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Move Pagination Out of Channel Entry - Best Practice

How Do I?

Okapi Creative's avatar
Okapi Creative
359 posts
5 years ago
Okapi Creative's avatar Okapi Creative

How do people handle this? I need to move the pagination out of the loop as it breaks the design. Stash doesn’t seem to be working and there’s a lot of overhead. Anyone have a workaround for this?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

Layouts should work, have you tried that? Pass the pagination over as a layout variable. I believe you want to use ‘inline’ if you do it, due to some oddities in pagination parsing.

If that doesn’t do it, if you have an identical channel entry opening tag, all of the heavy lifting should be cached so it shouldn’t add a lot of overhead. But I’d give it a good test in either case.

       
lttc's avatar
lttc
49 posts
4 years ago
lttc's avatar lttc

I too need to do this! There used to be a couple of add-ons helping for that, but none is compatible with EE 5. As for “Stash”, I really don’t understand how to do that with it, even if there is some coding example on the developer page, I’m lost !

<ul id="lightgallery" class="list-unstyled row"> {exp:channel:entries channel="shlt_photos" paginate="bottom" limit="5" } <li class="col-xs-6 col-sm-4 col-md-3" data-src="{photo:super}" data-download-url="false" data-sub-html="</p> <h4>{nom_photo}</h4> <p>{description}"> <a href="http://" class="hover-shadow">_ {photo:vignette}_ </a> </li> {/exp:channel:entries} </ul>

Can’t put the pagination code in the <ul>…

Thanks for your help!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.