Take the 2-minute tour ×  Is there any way (preferably without
modifying the source) that you can define a custom attribute to
apply to your spark elements?  For example, I'd like to define a
"permission" attribute so that I can do something like:  <div
permission="CanViewDivs">   which would then map to a specific
bit of code that would determine if the current user can view
divs and hide it if not.  I know about the condition attribute
and the spark bindings, but these don't quite accomplish what I
want.  share|improve this question I know this isn't answering
your question, but if it were me, I'd put the permission as a
bool on your ViewModel, then use <div if="CanViewDivs">...</div>
that way the Controller is making the decision to show/hide, not
your view. –  dave thieben Jul 21 '11 at 15:47 add comment  1
Answer  up vote 1 down vote accepted  The answer is "No" I'm
afraid. To do this, we'd have to have some kind of schema that
we'd feed into the Special Node parser and compiler, and I just
don't see tha