i actually work on a website wich display articles summaries and details with ajax (without reloading the page).
I have a problem with calling a specific summarytemplate in line below:
Code: Select all
var tmp = "index.php?mact=News,cntnt01,default,0&cntnt01category_id={/literal}{$entry->category_id}{literal}&cntnt01returnid=15&showtemplate=false&summarytemplate=standard";
I can't see where's the problem.
This i my complete code (it's a summary template wich close a zoomed gallery image and then must display the "standard" summarytemplate in a div):
Code: Select all
{literal}
<__script__ type='text/javascript'>
/* <![CDATA[ */
function ajax_load(dest) {
$(dest).fadeOut('slow', function() {
$(dest).empty();
var tmp = "index.php?mact=News,cntnt01,default,0&cntnt01category_id={/literal}{$entry->category_id}{literal}&cntnt01returnid=15&showtemplate=false&summarytemplate=standard";
var tmp2 = tmp.replace(/amp;/g,'');
$(dest).load(tmp2, function() { $(dest).fadeIn('slow'); init(); });
});
}
/* ]]> */
</__script>
{/literal}
{assign var=chemin value="`$entry->category`/`$entry->extra`"}
{Gallery dir=$chemin}
<a onclick="ajax_load('.centre'); return false;" href="#" class="btn_close"></a>