Hi Folks,

I'm creating a simple slideshow macro, and trying to set the background 
color of tiddlers dynamically from the color palette.

I've added this to ViewTemplate (actually, I copied 
the $:/core/ui/ViewTemplate from https://tiddlywiki.com/talkytalky/) which 
allows me to set background color according to the background-color field.


\define frame-styles()
background-color: $(backgroundColour)$;
border-color: $(backgroundColour)$;
\end


In my current color palette tiddler ($:/palettes/DWS)  I've added these 
lines:

1: #DEFF65
2: #FF9563
3: #FF7575
4: #5AD3FF
5: #A7FF7B

In each of my tiddlers to be colored, I have a field slidenum set to 1..5.

In my macro I've got this define: 

\define bgcolor() {{$:/palettes/DWS##$(slidenum)$}}

And I am using these commands to try to set the background color for each 
tiddler:

<!--set bg color of all slides in show -->
<$list filter="[tag<slidetag>!sort<slidenum>]">
<$vars slidenum={{!!slidenum}}>
<$action-setfield background-color=<<bgcolor>>/>
</$vars>
</$list>

It almost works, but in my background-color field, instead of the value 
from the palettte tiddler, I get:

{{$:/palettes/DWS##1}}

Some sort of escaping, I'm sure. Any help much appreciated!

//steve.

-- 
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/850c9dbb-8920-4121-a459-2702380b7fa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to