Quote from: Bruno17 at Jan 13, 2014, 12:10 AMif I understand, what you want, is to call every second a resource with your Ditto-call on it by ajax and send the parents-property to your ajax-resource with the ajax-request.
http://api.jquery.com/load/
if you don't want to code it by yourself, there are a ton of ajax-sliders out there.
Hey, thank you for your answer. It's not exactly what I want, I will try to make myself more clear. I have a layout-template with this (simplified) content:
<!DOCTYPE html>
<html>
<body>
<div class="col_content">
[!Ditto? &parents=`5` &orderBy=`createdon DESC` &display=`3`
&total=`4` &extenders=`summary` &tpl=`tpl_news` &truncLen=`160` &truncOffset=`20` !]
</div>
</body>
</html>
Now I am looking for a method which replaces this ditto call with another ditto call (or the parents variable) every other second. However I do not want to reload the rest of the page, just the content in the <div>.
So after 3 seconds or so it should look like this:
<!DOCTYPE html>
<html>
<body>
<div class="col_content">
[!Ditto? &parents=`6` &orderBy=`createdon DESC` &display=`3`
&total=`4` &extenders=`summary` &tpl=`tpl_news` &truncLen=`160` &truncOffset=`20` !]
</div>
</body>
</html>
Is replacing/mutating the ditto call after loading the page even possible?
Quote from: Jako at Jan 13, 2014, 01:06 AMThink you want to ranomize the parent parameter of Ditto: could be done like this.
[!Ditto? &parents=`[[Ditto? &documents=`1,2,3` &display=`1` &tpl=`@CODE[+id+],` &randomize=`1`]]`
&orderBy=`createdon DESC`
&display=`3`
&total=`4`
&extenders=`summary`
&tpl=`tpl_news`
&truncLen=`160`
&truncOffset=`20`
!]
This will create a randomized ditto call when the page is loaded, but it will not automatically change every other second after the page has been loaded, am i correct?