You don't need to add the class. Anyway, this is what one of my
ViewTemplates looks, so you can compare:

<!--{{{-->
<div macro="simpleroles Admin">
<div class='toolbar' macro='toolbar
[[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span
macro='view modified date'></span> (<span macro='message
views.wikified.createdPrompt'></span> <span macro='view created
date'></span>)</div>
<div macro='showWhenTagged PMaC'>
<div macro='showWhen config.options.chkLearningMode==true'>
<div macro='annotations'></div>
</div>
</div>
<div class='tagged' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='viewer'>
<span macro='showWhenTagged Customer'>
<span macro='formTiddler formCustomer'></span>
</span>
</div>
<div class='tagClear'></div>
<span macro='autoRefresh'></span>
</div>
<div macro="simpleroles !Admin">
<div class='title' macro='view title'></div>
<div macro='showWhenTagged PMaC'>
<div macro='showWhen config.options.chkLearningMode==true'>
<div macro='annotations'></div>
</div>
</div>
<div class='viewer' macro='view text wikified'></div>
<div class='viewer'>
<span macro='showWhenTagged translator_dashboard'>
<span macro='formTiddler formTranslatorDashboardUserView'></span>
</span>
<span macro='showWhenTagged Admin'>
<span macro='tiddler ./non-Admin'></span>
</span>
</div>
<span macro='autoRefresh'></span>
</div>
<!--}}}-->

Hope it helps. Also, see the original thread on SimpleRolesPlugin (1).
Otherwise, can you put a sample online, so we can take a look?

(1) 
https://groups.google.com/group/tiddlywiki/browse_thread/thread/1041f6f1dfc18484

w

On 18 okt., 15:54, Scott Masterson <[email protected]>
wrote:
> Didn't work (I did add class='toolbar', but that didn't affect it):
>
> <div class='toolbar' macro="simpleroles Admin">
>     <span macro='toolbar collapseOthers collapseTiddler closeTiddler
> jump editTiddler'></span>
> </div>
> <div class='toolbar' macro="simpleroles !Admin">
>      <span macro='toolbar collapseOthers collapseTiddler closeTiddler
> jump'></span>
> </div>
>
> Now I don't get the macro error, but the "edit" button is gone and
> doesn't come back for any username.  ???
>
> v/r,
> Scott
>
> On Oct 18, 9:11 am, whatever <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi!
>
> > Try this:
>
> > <div macro="simpleroles Admin">
> > all the stuff for admins
> > </div>
> > <div macro="simpleroles !Admin">
> > all the stuff for everyone else
> > </div>
>
> > w
>
> > On 18 okt., 13:53, Scott Masterson <[email protected]>
> > wrote:
>
> > > Good morning all,
>
> > > I'm almost finished building a TW-based quiz for the folks in my
> > > division, and am having a problem with my HideWhenPlugin syntax.  I'm
> > > using the SimpleRolesPlugin to determine what content gets seen
> > > (hiding answers from quiz-takers), but when I try to use it with the
> > > HideWhenPlugin, I get "error in macro <<showWhen>>.  The goal is to
> > > show the "edit" button for "Admin" roles, but not show it for everyone
> > > else.
>
> > > Here's what I have so far (in ViewTemplate):
>
> > > <div class='toolbar' macro="showWhen
> > > window.simpleRoles.contains('Admin')">
> > >     <span macro='toolbar collapseOthers collapseTiddler closeTiddler
> > > jump editTiddler'></span>
> > > </div>
> > > <div class='toolbar'  macro="else">
> > >      <span macro='toolbar collapseOthers collapseTiddler closeTiddler
> > > jump'></span>
> > > </div>
>
> > > Any thoughts?
>
> > > v/r,
> > > Scott- Hide quoted text -
>
> > - Show quoted text -

-- 
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