Eric,
works perfect ! (also reduced the code by (3) lines)
also works in the case of following a tiddler link to a tiddler that
has not yet been created (insert proper terminology here)

Mark,
Using this in the ToolbarComands, a leftover from my MPTW roots, more
of a convenience issue - using the little script to replace the
HideWhenPlugin but maintain the functionality / workflow I am used to
(and trying to reduce overhead a little more. . .)

Final Simplified / Working Script
<script>
if (tiddler && tiddler.isTagged('systemConfig'))
        wikify("[x(systemConfigDisable){}{}{var
id=story.findContainingTiddler(place).getAttribute('tiddler');}]
[[disable|systemConfigDisable]]", place);
</script>

I appreciate the help,

Mike



On Mar 1, 6:56 pm, "Mark S." <throa...@yahoo.com> wrote:
> Strangely enough, when I tried Mike's code inside a ShadowTiddler
> (with and without the systemConfig tag) it worked for me.
>
> But I think I'm missing the point of this exercise. If you want to
> disable plugins, you can just use the backstage "plugin" menu.
>
> Mark
>
> On Mar 1, 4:17 pm, Eric Shulman <elsdes...@gmail.com> wrote:
>
> > > works - except in the case where a shadow tiddler is shown "TypeError:
> > > store.getTiddler(tag) is null"
>
> > Shadow tiddlers are not real tiddler objects, and they don't have any
> > tags.  Also, since you already have the 'tiddler' context object (from
> > which you are using the tiddler.title), you can simply check to see if
> > it is non-null (i.e., not a shadow) and then use the isTagged(...)
> > method to test for the desired tag value.  So... instead of:
> >    var tags = store.getTiddler(tag).tags;
> >    if (tags.contains('systemConfig'))
> > you would write simply:
> >    if (tiddler && tiddler.isTagged('systemConfig'))
>
> > enjoy,
> > -e
> > Eric Shulman
> > TiddlyTools / ELS Design Studios

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

Reply via email to