Not that easy as I initially thought it was...
Maybe I'm now thinking too complicated but I have it working on my test-site (link:
http://tinyurl.com/p3dz2da)
Short explanation: created an extra page with inside the content ONLY the news module tag (so better turn of wysiwyg for that page).
Hide the page from the menu (didn't do that for this example/test)
Make sure that the PAGE template has the javascript fucntion 'ajax_load' already loaded/defined.
Code: Select all
{* javascript stuff that will perform ajax calls *}
<__script__ type='text/javascript'>
/* <![CDATA[ */
{literal}
function ajax_load(url,dest)
{
var tmp = url + "&showtemplate=false";
var tmp2 = tmp.replace(/amp;/g,'');
$(dest).load(tmp2);
}
{/literal}
/* ]]> */
</__script>
In the PAGE template I load the news module with load_ajax (news page has alias 'news' in this case):
Code: Select all
<div id="sidebar-news">
<__script__ type="text/javascript">
ajax_load('{cms_selflink href="news"}','div#sidebar-news');
</__script>
</div>
Inside the news template I used this code for the previous and next links:
Code: Select all
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
<a href="{$prevurl}" onClick="ajax_load('{$prevurl}','div#sidebar-news');return false;"><</a>
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
<a href="{$nexturl}" onClick="ajax_load('{$nexturl}','div#sidebar-news');return false;">></a>
{/if}
</p>
{/if}
It's only for testing and proof of concept. Code probably could be nicer but don't have much time now.