I'm struggling my mind trying to realize how can I use the reveal widget to show or hide content based on the value of a tiddler field or even the absence of that field.
Documentation says that I can use text references in the reveal widget, but it does not work.
Regards
<$reveal type='match' state='!!bob' text='eddie'>
Hi!
</$reveal>
Jed:
Thank you very much for this elegant little snippet. In spite of thinking of myself as a bit of a power User, I am always amazed at just how much I haven't thought of, or have yet to realize. This is a nest example that is a good reminder for me.
Thanks again for all of your contributions to this group.
Hans
<$list filter="[bob[eddie]]">
Hi!
</$list>
<$reveal type='match' state='!!bob' text='eddie'>
Hi!
</$reveal>
On 13 Dec 2016, at 21:03, Jed Carty <inmy...@gmail.com> wrote:
What a text reference is isn't really explained anywhere that I have seen. I had to look at the code before I realised what was going on. The only time you see it in most cases is as a transclusion using {{ and }}. I think this goes along with the differences between {, [ and < inside filters as one of the meaningful but non-obvious nuances in wikitext.
--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3ac2b9e3-deff-4abc-9cdc-e14a7e6dbcfa%40googlegroups.com.
A TextReference is the ''name'' of a tiddlywiki and optional field whose content contains text to be retrieved or modified by a widget or transclusion. Without the optional field reference, it refers by default to the text field of the named tiddler. Although TextReferences are used //by// transclusions, they are not the same as transclusions.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/87cbd0f7-8741-4635-abc5-65e547485d05%40googlegroups.com.
If I get that right, the tip at the end contains a typo (referent => reference) and could possibly be even clearer like:
<$macrocall $name=".tip" _="""Note the difference between a text reference such as `foo!!bar` (the name) and a transclusion of a text reference such as `{{foo!!bar}}` (the value)"""/>
Correct?
All the best!
Thomas (sent from mobile)
Hi MarkThanks. I took your text as a starting point and ended up with the following:Any suggestions for further improvements gratefully received.
--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/77a8ae72-7f47-4c69-8ac1-ae4149549857%40googlegroups.com.