That does it! Clever. Thank you :) On Sat, May 16, 2015 at 8:01 PM, Eric Shulman <elsdes...@gmail.com> wrote:
> > > On Saturday, May 16, 2015 at 7:11:17 PM UTC-7, Brian Gates wrote: >> >> I have spells tagged as belonging to certain classes. I want to create a >> display which list of spells with a dropdown to filter by a class (or not). >> >> <div class='input'> >> <label>Filter by Class</label> >> <$select field='selected_class' default='All'> >> <option value='All'>All</option> >> <$list filter='[tag[Class]]'> >> <option value=<<currentTiddler>>><$view field='title'/></option> >> </$list> >> </$select> >> </div> >> >> >> <ul> >> <$list filter="[tag[Spell]tag{!!selected_class}]"> >> <li>{{!!title}}</li> >> </$list> >> </ul> >> >> >> I can't figure out how to get the "all" portion to work. I can't find >> seem to do tag[*], nor can I figure out how to dynamically construct a >> query string to be used as a filter expression (it seems I can not >> dynamically select operators, only parameters). >> >> Any help appreciated! >> > > Hmm.... > > Assuming that all spells are tagged with "Spell" plus some unique class > tag, you could just use "Spell" as the value for the "all" option, and just > filter by the selected_class value, like this: > > <div class='input'> > <label>Filter by Class</label> > <$select field='selected_class' default='All'> > <option value='Spell'>All</option> > <$list filter='[tag[Class]]'> > <option value={{!!title}}>{{!!title}}</option> > </$list> > </$select> > </div> > <ul> > <$list filter="[tag{!!selected_class}]"> > <li>{{!!title}}</li> > </$list> > </ul> > > That should get you what you want. Let me know how it goes... > > enjoy, > -e > Eric Shulman > ELS Design Studios > TiddlyTools - "Small Tools for Big Ideas!" > InsideTiddlyWiki: The Missing Manuals > > YOUR DONATIONS ARE VERY IMPORTANT! > HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... > http://TiddlyTools.github.com/fundraising.html#MakeADonation > > Professional TiddlyWiki Consulting Services... > Analysis, Design, and Custom Solutions: > http://www.TiddlyTools.com/#Contact > > -- > You received this message because you are subscribed to a topic in the > Google Groups "TiddlyWiki" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/tiddlywiki/FREkHZwIyG0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > tiddlywiki+unsubscr...@googlegroups.com. > To post to this group, send email to tiddlywiki@googlegroups.com. > Visit this group at http://groups.google.com/group/tiddlywiki. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/c02f9594-2b77-4421-97f4-fc874fba0a90%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/c02f9594-2b77-4421-97f4-fc874fba0a90%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAKb6WhxZKFvQkvUr-Hm9ZxtXDqzGSRtw9s7Ygkh3Wh00BStt0g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.