CSS Class Inside List Widget

74 views
Skip to first unread message

Lance Boudreaux

unread,
Sep 10, 2015, 5:05:52 PM9/10/15
to TiddlyWiki
I have the following list widget that builds a table:

<table>
<tr>
<th style="text-align:left;">Name</th>
<th style="text-align:left;">Player</th>
<th style="text-align:left;">Status</th>
</tr>
<$list filter="[tag[Character]sort[title]sort[status]]">
<tr>
<td><$link to=<<currentTiddler>>>''<$view field=title/>''</$link></td>
<td><$view field=player /></td>
<td><span class="characterStatus"><$view field=status /></span></td>
</tr>
</$list>
</table>

I would like to set the span class based on the "status" field like so:

<td><span class="<$view field=status />"><$view field=status /></span></td>

 Is this possible?

Eric Shulman

unread,
Sep 10, 2015, 5:48:03 PM9/10/15
to TiddlyWiki
On Thursday, September 10, 2015 at 2:05:52 PM UTC-7, Lance Boudreaux wrote:
<td><span class="characterStatus"><$view field=status /></span></td>
I would like to set the span class based on the "status" field like so:
<td><span class="<$view field=status />"><$view field=status /></span></td>
 Is this possible?

like this:
<td><span class={{!!status}}>...</span></td>

enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

 
Reply all
Reply to author
Forward
0 new messages