MeanStudios - 06 July 2009 09:22 PM
this should work just fine for you
.
Thanks, Cody. You were correct. The address was incorrect. So, my test page worked great.
The next step was trying to get this to work in my real setup…which is quite a bit more complicated (naturally).
To start, I have a page with a series of checkboxes, and depending on what gets checked, values are sent via url and I am using ajax load to get the page. So, I may have a url that reads “***/index.php/research/get/dorsey/29/article”. Then, on that EE template I have some PHP code that reads that url and plugs in the values into the correct weblog entry parameters. Its on this page that I want my pagination code. (I will then pull this whole page over to the page with checkboxes, as I stated above)
So, my pagination code looks like this
<div id="ajax-text">
{exp:ajax_pagination weblog="research" limit="2" template="{site_url}index.php/research/get" holder="ajax-test" parse="inward"}
{prev_link} {if prev_link && next_link}|{/if} {next_link}
{exp:weblog:entries weblog="research" entry_id="not 38" category="<?php echo $myCategory; ?>" dynamic="off" search:authors="<?php echo $myAuthor; ?>" search:publication-type="<?php echo $myPubtype; ?>" limit="{limit}" offset="{offset}"}
<div><a href="{homepage}/{segment_1}/project/{url_title}">{title}</a>. {if authors}{authors backspace="2"}{au-first-name} {au-last-name}, {/authors}.{/if} {if publish-note}{publish-note}, {/if}{if publication-year}{publication-year}{/if}.</div>
{/exp:weblog:entries}
{/exp:ajax_pagination}
</div>
My problem appears to be with the ajax load url. Because, as I stated above, I use the url (segments) to build my weblog search.
FWIW, here is my php code…
<?php
$fullURL = $_SERVER['REQUEST_URI'];
$urlArray = split('\/', $fullURL);
$authorURL = $urlArray[(count($urlArray) - 3)];
$categoryURL = $urlArray[(count($urlArray) - 2)];
$pubtypeURL = $urlArray[(count($urlArray) - 1)];
$myAuthor = str_replace("-", "|", $authorURL);
$myCategory = str_replace("-", "|", $categoryURL);
$myPubtype = str_replace("-", "|", $pubtypeURL);
?>
Do you have any suggestions, Cody? Will I have to hack the plug-in to accept my full url? Or do you think I need to ditch the ajax pagination idea all together?
Thanks a ton for even reading this, I appreciate it!