Hello !
I have been trying to convert some FET items to InlineJavascript, and
I can't seem to get the syntax correct. . .
I am also using MatchTagsPlugin for the "where" statement. . .
(store.getMatchingTiddlers)
(Attempting to trim down the amount of Plugins in my TW & increase
performance)
My Example: (Actually (5) Examples)
{{center{{{small{__<<forEachTiddler
where
'tiddler.tags.contains("Wine")&& ! tiddler.tags.contains
("excludeLists")'
write
'""'
end 'count+" Wine(s) found "'
none '"No Wine(s) found "'
>>__
<<forEachTiddler
where
'tiddler.title != "Slices" &&
store.getTiddlerSlice(tiddler.title, "PersonalRank") ==
"Not Rated" &&
store.getTiddlerSlice(tiddler.title, "Purchased") ==
"Yes" &&
tiddler.tags.contains("Wine")&& ! tiddler.tags.contains
("excludeLists")'
write
'""'
end 'count+" Wine(s) [[not Rated|WineNR]]"'
none '"No Wine(s) without a Rating"'
>> & <<forEachTiddler
where
'tiddler.title != "Slices" &&
store.getTiddlerSlice(tiddler.title, "PersonalRank") ==
"Not Rated" &&
store.getTiddlerSlice(tiddler.title, "Purchased") == "No"
&&
tiddler.tags.contains("Wine")&& ! tiddler.tags.contains
("excludeLists")'
write
'""'
end 'count+" Recommended [[Wine(s)|WineRec]]"'
none '"No Recommended Wine(s)"'
>>}}}}}}
{{center{
{{centeredTable{
<<forEachTiddler
where
'tiddler.title != "Slices" &&
store.getTiddlerSlice(tiddler.title, "PersonalRank") >=8 &&
tiddler.tags.contains("Wine") && ! tiddler.tags.contains
("excludeLists")'
sortBy
'tiddler.modified'
descending
write
'"| "+store.getTiddlerSlice(tiddler.title, "Name")+" |
"+store.getTiddlerSlice(tiddler.title, "Grape")+" |
"+store.getTiddlerSlice(tiddler.title, "Year")+" |
"+store.getTiddlerSlice(tiddler.title, "Country")+" |
"+store.getTiddlerSlice(tiddler.title, "PersonalRank")+" |
"+store.getTiddlerSlice(tiddler.title, "ProfessionalRank")+" | {{fine
{[["+tiddler.title+"]]}}} |\n"'
begin '"|sortable|k\n| !Name | !Grape | !Year | !Country | !
Personal Rank | !Professional Rank ||h\n"'
none '"No Tiddlers found\n"'
>>
}}}
+++[Ranked Below 8]
{{centeredTable{
<<forEachTiddler
where
'tiddler.title != "Slices" &&
store.getTiddlerSlice(tiddler.title, "PersonalRank") <8 &&
tiddler.tags.contains("Wine") && ! tiddler.tags.contains
("excludeLists")'
sortBy
'tiddler.modified'
descending
write
'"| "+store.getTiddlerSlice(tiddler.title, "Name")+" |
"+store.getTiddlerSlice(tiddler.title, "Grape")+" |
"+store.getTiddlerSlice(tiddler.title, "Year")+" |
"+store.getTiddlerSlice(tiddler.title, "Country")+" |
"+store.getTiddlerSlice(tiddler.title, "PersonalRank")+" |
"+store.getTiddlerSlice(tiddler.title, "ProfessionalRank")+" | {{fine
{[["+tiddler.title+"]]}}} |\n"'
begin '"|sortable|k\n| !Name | !Grape | !Year | !Country | !
Personal Rank | !Professional Rank ||h\n"'
none '"No Tiddlers found\n"'
>>
}}}
===
}}}
I am not looking for a solution to all of the above (while that would
be nice) but more of a understanding so I can create / modify my other
(40+) FET tables in a similar manner. From what I have seen the
direct JS route performs better when sorting 100's of tiddlers in a
table.
Any assistance in my Education / Experimentation is always
appreciated :D
Thanks,
Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---