Sometimes it's easier to use the list widget for this kind of thing. Here's your two situations, if I understood them correctly:
<$list filter="[all[current]!has[big]!has[medium]!has[tiny]]"> ALL CLEAR </$list> (where big, medium, and tiny are fields) <$list filter="[all[current]tag[my_reveal_tag]]"> TAG IS REVEALED </$list> (where my_reveal_tag is the selecting tag) On Saturday, August 10, 2019 at 3:53:26 PM UTC-7, Joshua Baller wrote: > > Hi, > I have a knowledge base of sorts that I have built into a tiddlywiki. > Thousands of tiddlers are being specified in a set of google sheets (each > row is a tiddler). The CSVs are converted to JSON and imported, populating > tags, fields and the text field. The text field is just: <$transclude > tiddler="template_a"/>, the rest of the csv is defining tags or fields. The > transcluded template then renders the fields based on the template using a > lot of $view and $set calls. Frequently tiddlers may not have certain > fields defined, as a result I am using $reveal calls to include or exclude > parts of the template (mainly <$reveal type="nomatch" state="!!eff_cs" > text=""> like calls) > > In all, this is working pretty well. However, I have two particular > situations that I have not been able to figure out. > > 1. I want to reveal a part of the template based on if the tidder doing > the transclusion has a particular tag. e.g. IF my_reveal_tag > EXISTS_IN_TIDDLER then REVEAL some_text_in_template. > > Right now I have been making a tag for a trait in order to enable easy > indexing, and seperately making a field with the same information for > controlling the template. It would be easier to only define the information > in one place. > > 2. There are also some instances where I want a section of the template to > be revealed except when some set of fields are all blank. I tried to use a > macro to concatenate the fields and check if the results was an empty > string but I couldn't seem to get it to work. e.g. REVEAL > some_text_in_template IF field_a != "" OR field_b != "" OR field_c != "" > > > Any recommendations would be appreciated > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f1a5e5f5-2016-4da5-8866-4038725562f6%40googlegroups.com.