Hi Cody,
Thanks for cooking this up. Does it change the url when you page through the pagination this generates?
I gave it a test run today and it’s duplicating h2 on the page and not progressing to the next page. Here’s my setup:
<html>
<head>
[removed][removed]
</head>
<body>
<div id="ajax_content">
{embed="incs/ajax_template"}
</div>
</body>
</html>
{exp:ajax_pagination weblog="weblog" limit="1" template="ajax_template" holder="ajax_content" parse="inward"}
{prev_link} {if prev_link && next_link}|{/if} {next_link}
{exp:weblog:entries weblog="weblog" disable="pagination|member_data|trackbacks" limit="{limit}" offset="{offset}" dynamic="off"}
<h3>{title}</h3>
{/exp:weblog:entries}
{/exp:ajax_pagination}
As you can see I stripped all those original divs out of there trying to get to the bottom of why it’s not working, but I couldn’t figure it out.
Andy,
It’s nothing you’ve done. I actually made this while working with the built in EE Calendar and it’s tailored to work with that. I never did test it with weblog entries ><. I’m now looking at the code going, “Oh my god, what was I thinking ahaha.” So I need to update this plugin so it actually works for weblog entries, very sorry 😕.
To answer your question though, no, it does not change the URL. It’s only meant for a small bit of your website, not main content. I wouldn’t recommend using it for main content (when I’ve reworked the plugin) as google won’t like it too much 😊.
Again, sorry about that!
Alright, I have fixed the problem. To make this work, make sure in your Ajax Template in the paramater “template” you enter int your Template Group and Template to your Ajax Template 😊. So if your Ajax Template was called “ajax_stuff” and it’s under the Template Group “includes” then the “template” parameter would be:
template="includes/ajax_stuff"
Have fun! 😊
Updated the plugin again to fix a potential bug for people not removing index.php from their URL’s. The change is to put the full URL to your Ajax Template in the “template” parameter. I’m guessing 99% of the time it could look like this:
template="{site_url}template_group/ajax_template"
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.