Greetings,
My plan is to have a ditto call to retrieve the most recent document and display it in template A. Then below that I’d like to display all subsequent documents in template B. Is it possible to filter out the one document from the first Ditto call? Can I pass the id Ditto is retrieving to the second instance?
I twitch because I care....and drink too much coffee.
Hmmm,
The above snippet isn’t working yet. As far as I can tell. When I open the Ditto console it comes up with a backend filter as such: id::2
That seems to say the snippet isn’t returning a value??? I’m going to keep tinkering with it and see if I can get it to work. Thanks for the responses.
UPDATE: Ok so in the parameter localFilterDelimiter, the "D" just needs to be capitalized. Now it returns all the documents including the one from the first Ditto call. Again I’m getting close I’ll post any updates I find.
The issue seems to be the snippet failing to pull the first Ditto placeholder.
I twitch because I care....and drink too much coffee.
Does anyone know how Ditto broadcasts it’s placeholders? I can’t find any documentation anywhere that lists the placeholders. Specifically if I wanted to use the MODx API to query them.
I twitch because I care....and drink too much coffee.
I’m a little confused on that post. So do I need to include a separate snippet called save or something? Or do I just use the &save parameter?
Then I should be able to access the ditto placeholders? Sorry for the hand-holding I haven’t delve this far into Ditto before.
I twitch because I care....and drink too much coffee.
I don’t know what exactly happened but it works!
The goal was to have two ditto calls, one to pull the most recent article with image, then in a separate part of the page, another Ditto call to pull all posts OTHER THAN the most recent.
heliotrope’s solution worked! I changed the page to cached, unchached the previousID call, and cached the Ditto call. I also added a &save=`2` to the first call and bam! Thanks to all who have responded. That save parameter is trickey, I never was able to list all parameters to see who they’re coming out. Even after searching around and finding Marks solution:
http://modxcms.com/forums/index.php/topic,20929.msg137250.html#msg137250
I never got that to work. I am still interested if anyone knows how to dump the Ditto output to see how the placeholders are formed. Thanks again!
I twitch because I care....and drink too much coffee.