On May 24, 4:51 am, axs <[email protected]> wrote: > Hi folks, Where can I get documentation on how to use store.sortTiddlers(), > especially the "field" parameter? > How much detail do you need? A quick overview is that the function sortTiddlers takes 2 parameters store.sortTiddlers(tiddlers, field); where tiddlers - is an array of tiddler objects field - is the field you wish to sort the tiddlers by (e.g modified or created). It accepts any of the default tiddler fields and can also be used with any extended fields you might have given to tiddlers.
The field parameter can also be prepended with a '+' or a '-' to indicated whether you want the tiddlers to be sorted in ascending or descending order. For example if I wanted to sort the tiddlers by 'changecount' in descending order I'd put the following: var sortedTiddlers = store.sortTiddlers(tiddlers, "-changecount"); The function then returns the array of tiddlers which has been sorted. Hope that helps, Colm -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
