I'm sure there is a better way to do this so I'm hoping someone can help me.

I have a journal tiddler that has a field called mood. I put a value  from 
1 to 5 to describe my mood for the day.

I have a dictionary tiddler that has a CSS class for each number. So, it 
would look something like this

1: bg-red
2: bg-orange
3: bg-yellow
4: bg-green
5: bg-blue

Now what I want to do is to create a bit of HTML that will dynamically 
build the css classes based on this setup. So, for example, if my mood was 
2, it would build the html 

<div class="bg-orange w-10 h-10"></div>

I use this to display a little colored box when viewing the tiddler to show 
my mood for that day. I can get it to just include the "bg-orange" part, 
but as soon as I try to add any other class to the DIV, it doesn't work. I 
get it either not being able to pull in the field value to grab data from 
the data tiddler, or it just prints out the wikitext as plain text, etc.

Can anyone think of a better way to do this?

Thanks.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0512852b-484e-4a5b-904d-6a15deb58f31n%40googlegroups.com.

Reply via email to