Greetings, all! Please bear with me; I have a lot of info to share about the issues I’m having. 😊
I got sick of the world of social media & decided to go back to my blogging roots. Remembering how much I loved using EE back in the day, I decided to go with it again for this purpose. Admittedly, I’m quite rusty in the re-learning process, and quite a bit seems to have changed. I’ve managed to figure out just enough to be dangerous, LOL, but I’m having real issues with pagination (and with paginating within a grid).
First and foremost, including the pagination code within my original exp:channel: entries tag breaks the grid layout, rendering my posts in a completely vertical fashion instead of the 2 x 2 layout I have in place. Unable to figure out WHY that’s happening, I decided to leave the pagination in it’s original place (I’m using a pre-coded template), and just wrap that in the exp:channel:entries tag by itself. This is where the 2nd set of issues begins.
I have 5 total entries right now in my blog. When all is said & done, I want there to be 6 per page; however, for the purpose of testing pagination, I have the limit set to 3 in the original entry display code, as you see it below:
{exp:channel:entries channel="cerebral-chaos" orderby="date" sort="desc" limit="3"}
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 post">
<!-- Start Featured Image -->
<div class="img-article">
<a href="http://{url_title_path=cc-main/comments}">_<span> /assets/themes/Winter2018/img/plus.png</span>_</a>
{cc_featured_image}
</div>
<!-- End Featured Image -->
<!-- Start Title -->
<h2><a href="http://{url_title_path=cc-main/comments}">{title}</a></h2>
<!-- End Title -->
<!-- Begin Main Entry -->
{if cc_main_entry}
{exp:chopper words="20"}
{cc_main_entry}
{/exp:chopper}
<a href="http://{url_title_path=cc-main/comments}">Full Post →</a>
{/if}
<!-- End Main Entry -->
<hr>
<!-- Begin Entry Date/Author -->
<div class="date">
{entry_date format="%F %d, %Y"} <span>|</span> {if allow_comments} <a href="http://{url_title_path=cc-main/comments}">{comment_total} Comments</a>{/if}
</div>
<!-- End Entry Date/Author -->
</div>
{/exp:channel:entries}
Pagination:
{exp:channel:entries channel="cerebral-chaos" limit="1"}
{paginate}
<div class="pagination">
<hr>
<hr>
{pagination_links}
<hr>
<hr>
</div>
{/paginate}
{/exp:channel:entries}
Now, before I changed the limit to 1 in the pagination code, the pagination links wouldn’t show up at all. Nada, zilch. I changed it to 1 & the pagination displayed. Unfortunately, when I mouse over the “Page 2” link, it shows “P1”, and when I click on it, it doesn’t take me to the other entries; rather, it displays the same entries as Page 1.
Facts:
1) I’ve checked & double checked my Channel URL & base URL settings; they all appear to be set correctly.
2) I DO have “remove index.php” enabled & the mod rewrite is in my .htaccess file. REMOVING it & re-adding index.php has no effect on this issue.
3) I am not using any add-ons for pagination or that would otherwise interfere with its output.
4) I’ve added “dynamic=no” to the code, left out the “dynamic=” code altogether, added “pagination_base” directives, changed the limit to match that of my entry limits, etc., and none of that has resolved the issue.
5) I’m using EE version 4.0.7. The URL is http://thelionscher.com/cc-main/blog
If it ends up being that I must use the pagination code within the original entry tags, how do I keep it from breaking my layout? If I’m fine using it the way it’s currently set up in my template, how do I actually get the pagination links to point to where they’re supposed to, and show the remaining entries, as expected? I’m sure the solution has to be a simple one, but it’s certainly eluding me.
Thanks so much for your help! (Sidebar: I’ve already created a dev account for someone to use if it comes to that. LOL)
Have a great day!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.