{{introduction||$:/core/ui/TagTemplate}}
{{introduction||$:/core/ui/TagTemplate}}
{{introduction||$:/core/ui/TagTemplate}}
(By the way, I like very much 5.0.9. Thanks!)
Alberto
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
The problem is that each of the tag pill dropdowns is referencing the same state tiddler. If you can arrange things so that each tag pill is within a separate transclusion then they will be assigned different state tiddlers, and will no longer be coupled together.
I don't understand the concept of separated transclusions. I have similar problems so if you explain the solution to me I will be grateful.
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
<$list filter="[!has[draft.of]tag<currentTiddler>!tag[done]sort[created]]">
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox><$list filter="[all[current]tags[]sort[title]] +[remove[Task todo]] " storyview="pop"> {{||$:/core/ui/TagTemplate}}</$list>
</$list>// my altered version of the tag-body-inner macro
[...]
\define tag-body-inner(colour,fallbackTarget,colourA,colourB, state)<$set name="foregroundColor" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>><$set name="backgroundColor" value="""$colour$"""><$button popup=<<qualify "$state$">> class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button><$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes"><div class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/><hr><$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/></div></$reveal></$set></$set>\end
[...]
\define createTag(title, tag)<$set name="id" value="$:/state/popup/tag$title$$tag$"><$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} state=$(id)$/></$set>\endIsn't what I am doing in the inner list (the {{||}} call of the tag template a seperate transaclusion for each single tag? Or am I on the wrong track here somehow?
Nevertheless I tried to build on Jeremys comment, that the tag template in difference to the tab macro does not have the ability to define a custom state.I tried my own version of the tag template and enhanced the macros with a custom state parameter to be passed in, but all I accomplished was, that the click on my tagsdid not give any result at all. No popup, nothing.// my altered version of the tag-body-inner macro
[...]
\define tag-body-inner(colour,fallbackTarget,colourA,colourB, state)<$set name="foregroundColor" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>><$set name="backgroundColor" value="""$colour$"""><$button popup=<<qualify "$state$">> class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button><$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes"><div class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/><hr><$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/></div></$reveal></$set></$set>\end
[...]
<$button popup=<<qualify """$state$""">>...
<$reveal state=<<qualify """$state$""">> ...
<$button popup=<<qualify """$:/state/popup/tag/$state$""">>
<$reveal state=<<qualify """$:/state/popup/tag/$state$""">>
The state parameter I am passing in is build in a own macro, concatenated from a the tiddler title and the current tag\define createTag(title, tag)<$set name="id" value="$:/state/popup/tag$title$$tag$"><$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} state=$(id)$/></$set>\end
... state="""$(id)$"""<$set name="id" value="$:/state/popup/tagfoobar">
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} state=$(id)$/>
</$set>
\define createTag(title, tag)
<$set name="id" value="$:/state/popup/tag$title$$tag$">
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} state=<<id>>/>
</$set>
\end
<$list filter="[tags[]]"><<tag>></$list><$list filter="[tag[Concepts]]">
{{!!title}} <$list filter="[is[current]tags[]]"><<tag>></$list>
</$list>There's a <<tag>> macro which often simplifies things -- for example, try this (in a tiddler with some tags.)<$list filter="[tags[]]"><<tag>></$list>
The problem is that the state="..." param in the $reveal widget *must* be the same value as the popup="..." param in the corresponding $button widget. Thus, you need to write:<$button popup=<<qualify """$state$""">>...
<$reveal state=<<qualify """$state$""">> ...or perhaps this would be even better:<$button popup=<<qualify """$:/state/popup/tag/$state$""">>
<$reveal state=<<qualify """$:/state/popup/tag/$state$""">>
One small problem here is that you forgot the quotes are $(id)$. Since the id value MIGHT contains spaces (from the tiddler title), you should write:... state="""$(id)$"""Howevr, the much bigger problem here is that you can't use the $(id)$ syntax to insert the value from a variable that was just $set. Macros do NOT "run" their content and return the output. Rather, then ONLY expand the $(variable)$ and $param$ references that exist when it is invoked and then return THAT content for processing in the calling context. Thus, your macro, when called with <<createTag foo bar>> produces this output:<$set name="id" value="$:/state/popup/tagfoobar">
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} state=$(id)$/>
</$set>Note that the $(id)$ syntax remains, because the variable was NOT defined when the macro was *invoked*.
{{||$:_/woto/ui/TasklistTemplate}}
!! Offen <$list filter="[!has[draft.of]tag<currentTiddler>!tag[done]sort[created]]">
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox><$set name="tiddlerTitle" value={{!!title}}><$list filter="[all[current]tags[]sort[title]]" storyview="pop"><$set name="currentTag" value={{!!title}}>{{||$:_/woto/ui/TagTemplateUnique}}</$set></$list></$set></$list>
\define tag-styles()background-color:$(backgroundColor)$;fill:$(foregroundColor)$;color:$(foregroundColor)$;\end
\define tag-body-inner(colour,fallbackTarget,colourA,colourB, state)<$set name="foregroundColor" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>><$set name="backgroundColor" value="""$colour$"""><$button popup=<<qualify """$state$""">> class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button><$reveal state=<<qualify """$state$""">> type="popup" position="below" animate="yes"><div class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/><hr><$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/></div></$reveal></$set></$set>\end
\define tag-body(colour,palette,state)<span class="tc-tag-list-item"><$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} state="""$state$"""/></span>\end
\define createTag(title, tag)<$set name="id" value="$:/state/popup/tag/$title$$tag$"><$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} state=<<id>>/></$set>\end
<$macrocall $name="createTag" title=<<tiddlerTitle>> tag=<<currentTag>>/>
<<` """before <$appear>
! Some Heading
Some more text.</$appear> after""">><<` """before <$appear>
PS. @TobiBeer, I can't get your CSS working in my wiki, I had assumed it would come in from your $:/plugins/tobibeer/appear/styles sub-tiddler in my TW, but it's not working. See the Simple Slider With Button With Selected Class example in my copy of the appear » Examples tiddler. It's not turning pink for me.