Ah I see now, thanks for the clarification! -Petri
On Fri, Sep 10, 2021 at 5:12 PM Eric Shulman <elsdes...@gmail.com> wrote: > If there were were simple quotes around the filter, then it would be > treated as a literal text value. The triple braces indicate that the > parameter is using a “filtered transclusion” (aka, “inline filter”) and > needs to be processed to get it’s actual value. > > Note that, when used in normal wikitext content, the results of a filtered > transclusion can return multiple values that are treated as a list of > links. However, when a filtered transclusion is used as parameter in a > $widget, only the first item in the list is used as the parameter value. > > To see the difference, put the following content into a tiddler at > http://TiddlyWiki.com <http://tiddlywiki.com/>… > {{{ [tag[HelloThere]] }}} > > <$text text={{{ [tag[HelloThere]] }}}/> > > -e > On Friday, September 10, 2021 at 3:22:52 AM UTC-7 Petri M. wrote: > >> Oh my god THANK YOU this was driving me nuts. I read that the popups are >> dismissed on click but I thought that you need to click the popup itself to >> dismiss it and I just never realised that you really do not have to. >> >> Just one question, if I understand correclty the setTo=... is just a >> filter that checks whether the value of test1 is "hide", if it is, it >> outputs "show", if not then it outputs "hide". However, why do we need the >> triple braces around the filter? >> >> BR, >> Petri >> >> On Thursday, September 9, 2021 at 4:31:19 PM UTC+3 Eric Shulman wrote: >> >>> On Thursday, September 9, 2021 at 2:56:13 AM UTC-7 Petri M. wrote: >>> >>>> I can't figure this one out. So, I have a sidebar search tiddler where >>>> I want to show three different kinds of searches at the same time but I >>>> want each of them to be collapsable for easy navigation. I got everything >>>> else working fine but I cannot figure out how to get them to collapse and >>>> expand independently. >>>> >>> >>> Popups are intended to* appear only when the corresponding state >>> tiddler has a value* and the TWCore system *automatically dismisses >>> popups when it detects a click elsewhere.* >>> >>> However, your goal is to have an "anti-popup" that has the inverse >>> behavior... i.e., it defaults to being visible unless the state tiddler >>> value is set by a button click, and then remains that way until the button >>> is clicked again. The solution is to *not use popups at all.* >>> Instead, you want the button to simply toggle the state tiddler between >>> blank and non-blank and then use that value to determine when to show the >>> associated content. >>> >>> Here's one way to write this using set/setTo and a "filtered >>> transclusion" to calculate the desired state value: >>> >>> <$button class="sidebar-collapsible" >>> selectedClass="sidebar-collapsible-onclick" >>> set="test1" setTo={{{ [{test1}match[hide]then[show]else[hide]] >>> }}}>Title matches:</$button> >>> <$reveal state="test1" type="nomatch" text="hide"> ... t1 </$reveal> >>> >>> <$button class="sidebar-collapsible" >>> selectedClass="sidebar-collapsible-onclick" >>> set="test2" setTo={{{ [{test2}match[hide]then[show]else[hide]] >>> }}}>Title matches:</$button> >>> <$reveal state="test2" type="nomatch" text="hide"> ... t2 </$reveal> >>> >>> Note: The current value of the state tiddlers will be retained when you >>> save your file. However, if you want the state tiddlers to be reset when >>> you save the file, *name them starting with "$:/state/popup/"*. By >>> default, tiddlers with that prefix are not retained when the file is saved. >>> >>> enjoy, >>> -e >>> >> -- > 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/pjT4iV_wHE4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > tiddlywiki+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/53721910-ad92-4c66-8266-075a2548cfdcn%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/53721910-ad92-4c66-8266-075a2548cfdcn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAOv-5H8bycQS%2B4aG3RArtkRhd3mybRxma5SPVbq9w0extF4gzw%40mail.gmail.com.