I have a snippet which returns a number of records from a database. The records can contain text, dates, etc., and as a result each record looks like a miniature document. I don’t know ahead of time how many records may be returned on a given query (some records may have expired) so I could conceivably end up with a very long output being displayed.
I’m wondering if there is a way to use Ditto to view this output as a set of documents and paginate them accordingly? At the moment, the results of each query are just appended to the current output variable and at the end of the snippet the entire variable is returned for display. But I have complete control over how this is formatted.
Does anyone know if a Ditto call (either on the document that calls the snippet, or glued to the start of the output) can be combined with the output results to create a page that is paginated "on the fly"?
Thoughts, tips, pointers, tutorials or other suggestions would be welcome.
Thanks in advance,
Matt