php - Ajax pagination in joomla -
i looking implement ajax based pagination system in joomla. ever tried before? , pointers or suggestions?
with joomla cannot navigate away url means of 'get'. prohibits pagination classes working use url modification work(via get). alternatives either post or ajax pagination, , ajax seems easier accomplish , have nicer looking result.
any tutorials ive tried havent worked out well. don't know if matters, i'm using mysqli.
addfullajax plugin, suggested in previous answer, tries make site "fullajax'd" default. can simple overwrite. here couple simple steps configuration of plugin enable ajax (correctly ahah ;) ) pagination :
- set "enable positions update" "using fullajax_tmpl" (also not forget install template)
- in "content css id" need set content id placed content
- in "advanced options" in "parameters fullajax" field need delete all, , put there next code:
function wrappager(){ $$('div.pagination a').addevent('click', function(){ hax({url:this.href, id:fullajaxid,nohistory:1, onload:wrappager}); return false; }); } window.addevent('domready', function() { wrappager() }) same can without plugin, download , connect fullajax library in template. use next example:
function wrappager(){ $$('div.pagination a').addevent('click', function(){ var url = this.href + '&tmpl=component' hax({url:url, id:'id-of-block-where-a-content',nohistory:1, onload:wrappager}); return false; }); } window.addevent('domready', function() { wrappager() }) more hax() can find on wiki page
Comments
Post a Comment