I admire Alex's approach, since I'm pretty sure that TW won't use the
@@ syntax on links. The problem though, is that *all* the links in the
tiddler, including the tiddler name right after the checkbox, will
also be in the new color. I assume that the tiddler title was meant to
be left if traditional blue link color.

But you can wrap the links in a class inside of the code, which I've
modified like this:

[x($1|done){}{}{}] [[$1]] [ <script>
var out="{{tagtag{", n=0, t=store.getTiddler('$1');
tids = store.filterTiddlers("[tag[ACTION]]");
for (var i=0; i<tids.length; i++) {
   if (t.tags.contains(tids[i].title)) out += (n++>0?', ':'') +
'['+'['+tids[i].title+']'+']';
}
return out +"}}}" ;
</script>  ]

using classname "tagtag". Then in your stylesheet you can use:

 .tagtag .tiddlyLinkExisting {color: #228B22;}

to apply the color. This worked in my test.

Mark

On Dec 14, 2:58 am, Alex Hough <[email protected]> wrote:
> RE: The only problem is that the color statement does not get applied to
> the link that is generated.  Any ideas there?
>
> You could tag the Tiddler with something (eg "Foo")  then use the native TW
> syntax that can select  a particular tiddler by tag [1] .
> Something like this should work, but I've not tested it;
>
> div[tags~="Foo"].tiddler .viewer .tiddlyLinkExisting{
> color : Bar;
>
> }
>
> Alex
>
> [1]http://tiddlywiki.com/#AnotherExampleStyleSheet
>
> 2009/12/14 Saverio <[email protected]>
>
>
>
> > Thanks! That got me experimenting...I was able to do it in a single
> > tiddler as follows:
>
> > [x($1|done){}{}{}] [[$1]] <script>
> > var out=[], n=0, t=store.getTiddler('$1');
> > tids = store.filterTiddlers("[tag[action]]");
> > for (var i=0; i<tids.length; i++) {
> >   if (t.tags.contains(tids[i].title)) out += (n++>0?', ':'') +
> > '['+'['+tids[i].title+']'+']';
> > }
> > if (out) return '[ @@color: #228B22; '+out+' @@ ]';
> > </script>
>
> > The only problem is that the color statement does not get applied to
> > the link that is generated.  Any ideas there?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "TiddlyWiki" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<tiddlywiki%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/tiddlywiki?hl=en.
>
> --http://www.multiurl.com/g/64

--

You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.


Reply via email to