You can't use a widget as the input to an attribute. Widgets are like HTML
tags. Just as you can't have an HTML tag inside (used as an attribute)
another HTML tag, you can't use a widget inside an HTML tag.
But you can use transclusion, due to the miracle of wikitext rendering. So
if you change your template to:
<font color={{!!colorcode}}>The quick fox...</font><br/>
This will work.
Good luck
-- Mark
On Wednesday, November 21, 2018 at 1:40:49 AM UTC-8, Terry Chen wrote:
>
> I created a tiddler "list" like this:
>
> <$list filter='[tag[role]]' template='role_color_template'></$list>
>
>
> and another tiddler named "role_color_template" like this:
>
> <$view field='colorcode'/><br/>
>
> this is the correct way to create a template, right?
>
> Then I created a tiddler name "customer" with tag "role". I gave a field
> name="colorcode", value="#FF0000" to it.
>
> So, in the "list" tiddler, it shows:
> #FF0000
>
> But, when I tried to put the code in "font" tag, just like this:
>
> <font color="<$view field='colorcode'/>">The quick fox...</font><br/>
>
>
> it doesn't work.
>
> Is that possible?
>
--
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 [email protected].
To post to this group, send email to [email protected].
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/6d3e6dad-99d4-47c5-91bd-870cab11753b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.