<<forEachTiddler
where
'tiddler.tags.contains("information")'
sortBy
'store.getValue(tiddler,"created")'
descending
write
'(index < 5) ? tiddler.title+"\n" : ""'>>
That should do it, just replace tiddler.title+"\n" with your own code
in quotes. I had some trouble with your code, so you might want to
debug it. As far as I can tell, the quotes @@\n" + "{{excerpt{\n are
not necessary, since this is all a literal string.
w
On Feb 10, 10:08 pm, magev958 <[email protected]> wrote:
> Hi, I been tinkering with TiddlyWiki for some time now and starts to
> get the hang of it, but my programing skills is an empty hole.
> I found great piece of code (I think it was here) for the plugin
> ForEachTiddler that display just the first bit of every tiddler in
> order. Works great, but I'd like to limit the number of tiddler it
> displays to say 5. How do I get about to do that?
>
> <<forEachTiddler
> where
> 'tiddler.tags.contains("information")'
> sortBy
> 'store.getValue(tiddler,"created")'
> descending
> write
> '"\n@@font-size:1.5em;[["+tiddler.title+"]]@@@@color:#999; - " +
> Date.convertFromYYYYMMDDHHMM(store.getValue(tiddler,"created")).formatString("YYYY/
> 0MM/0DD")+" - "+tiddler.modifier+"@@\n" +
> "{{excerpt{\n" +
> (tiddler.text.match("/%%/") ?
> tiddler.text.substr(0,tiddler.text.indexOf("/%%/")) :
> tiddler.text.substr(0,300)) +
> " ...\n[[more ...|"+tiddler.title+"]]\n----\n}}}";'
>
>
>
> Thanks in advance/
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/tiddlywiki?hl=en.