How to use the a field in a widget call inside a list

60 views
Skip to first unread message

Arlen Beiler

unread,
Feb 4, 2019, 10:23:31 PM2/4/19
to TiddlyWiki
From the sidebar tiddler

<$reveal type="nomatch" state=<<config-title>> class={{<<listItem>>!!containerClass}} text="hide"  tag="div">

Adding this doesn't seem to work.

Mark S.

unread,
Feb 4, 2019, 11:23:44 PM2/4/19
to TiddlyWiki
Hi Arlen,

You can't use wikitext inside of wikitext as you are attempting here: {{<<listItem>>!!containerClass}} nor can you concatenate text on the fly.

But sometimes you can do all that inside of wikify. So the first thing I would try is something like:

<$wikify name="myreveal" text="""

<$reveal type="nomatch" state=<<config-title>> class={{<<listItem>>!!containerClass}} text="hide"  tag="div">"""
<<myreveal>>
</$wikify>

If that doesn't work, I would put listitem in a macro, perhaps like:

\define listclass() {{$(listitem)$!!containerClass}}

and then invoke like

...class=<<listclass>>....


HTH

-- Mark


Jeremy Ruston

unread,
Feb 5, 2019, 10:32:47 AM2/5/19
to tiddl...@googlegroups.com
I’d recommend not using the wikify widget for this kind of thing; it’s a sledgehammer to crack a nut.

Better to try something like this:

<$reveal type="nomatch" state=<<config-title>> class={{{ [<listItem>get[containerClass]] }}} text="hide"  tag="div”>

Of all the features added to TW5 in the last few years, I think the triple braces syntax for transcluded filtered attributes is the one that adds the most expressiveness to wikitext...

Best wishes

Jeremy.


--
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/CAJ1vdSQngANL0X-9UGr%3DkPifAMvpT_BmAWyHpRL9V9CJLEUC6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages