So, the question is that I want to have an icon to show near a project name
based on its category. Let's assume I have tiddlers "category1-icon",
"category2-icon", "category3-icon", "category4-icon", "category5-icon" with
some image (images) in them (not the "content-type: image" thing, just a
simple [image[http:/blablalba.jpg]]). And a "category" field in tiddlers
(with values "category1", "category2" etc.)
If I want to put an icon in a text field of a tiddler, I just type smth
like this
(thanks again to Eric for "tilda" thing explanation):
<$set name="category-var"
filter="[<currentTiddler>category[category1]then[category1-icon]]
~[<currentTiddler>category[category2]then[category2-icon]]
~[<currentTiddler>category[category3]then[category3-icon]]
~[<currentTiddler>category[category4]then[category4-icon]]
~[<currentTiddler>category[category5]then[category5-icon]]">
<$transclude tiddler=<<category-var>> />
</$set>
And it kinda works. But I don't know how to "shove" all this thing into a
list.
For example, if I have a list:
<$list filter="[tag[project]state[Active]!sort[lastedit]]"> <ul> <li>
<$link/> (I WANT CATEGORY ICON HERE) (<$view field="lastedit" format="date"
template="0DD.0MM.YYYY"/>) </li> </ul> </$list>
I don't know how to do that.
Currently I'm just filling TWO separate fields "category" and
"category-icon" (with the tiddler names "category1-icon", etc.) for each
project and use this:
<$list filter="[tag[project]state[Active]!sort[lastedit]]"> <ul> <li>
<$link/> <$transclude tiddler={{!!category-icon}} /> (<$view
field="lastedit" format="date" template="0DD.0MM.YYYY"/>) </li> </ul>
</$list>
But that's a bit annoying because it is kind of "double work" filling two
fields instead of one for every project. I was wondering if that could be
solved more elegantly.
--
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/fbe01f40-868d-4c2e-962b-a7a667fcfb96o%40googlegroups.com.