Hey Mark

This tweak did the trick. Thanks for nudging me to the right tiddler to 
tweak, and for giving me just enough to be able to figure it out!

Dave

\define tag-styles()
background-color:$(backgroundColor)$;
fill:$(foregroundColor)$;
color:$(foregroundColor)$;
\end

\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" 
fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" 
colourB:"""$colourB$""">> backgroundColor="""$colour$""">
<$link><$button class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>>
<$transclude tiddler={{!!icon}}/> <$view field="title" format="text" />
</$button></$link>
\end

\define tag-body(colour,palette)
<span class="tc-tag-list-item">
<$macrocall $name="tag-body-inner" colour="""$colour$""" 
fallbackTarget={{$palette$##tag-background}} 
colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>
</span>
\end

<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>

On Saturday, November 12, 2016 at 12:06:56 PM UTC-6, Mark S. wrote:
>
> I'm sure someone will come up with a more elegant solution, but if you 
> replace the contents of:
>
> $:/core/ui/TagTemplate
>
> with 
>
> <$link><$view field="title" format="text" /></$link>
>
> Then all your tag buttons will become links (of course, this assumes they 
> have something to link to). Then do your export -- it worked for me on a 
> quick test with the table of contents from tiddlywiki.com. Afterwards, 
> delete $:/core/ui/TagTemplate to restore it to its original shadow status.
>
> Good luck,
> Mark
>
>
> On Saturday, November 12, 2016 at 8:45:10 AM UTC-8, David Gifford wrote:
>>
>> Hi guys
>>
>> I don't know if this is possible, but I was wondering if there would be a 
>> way to convert tag pills to links to the tiddlers for those tags when 
>> exporting all tiddlers as static htmls.
>>
>> Having this feature would facilitate navigation between statics of each 
>> tiddler if one also created a tiddler for each tag with a list of tiddlers 
>> tagged with that tag.
>>
>> So, say I have static htmls from a TW, and the Abraham Lincoln tiddler is 
>> tagged US presidents. Current behavior when clicking on that tag pills 
>> is...nothing. Static means no popups or anything. But if clicking on the 
>> tag pill took me to the static html US presidents, and that tiddler had a 
>> list of all tiddlers tagged US presidents, then I could from there navigate 
>> to Barack Obama or George Washington.
>>
>> Is there any way to tweak my TiddlyWiki to create this behavior?
>>
>> Dave
>>
>

-- 
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/426f3a08-7ccd-411d-b7ff-8a3e3b3241ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to