Van C schrieb:
> I'd like to control importing of certain CSS stylesheets based on
> group access.  The following works fine:
> 
> <style type="text/css" media="screen" py:if="'admins' in
> tg.identity.groups">@import "${tg.url('/static/css/agency.css')}";</
> style>
> 
> But what if I want to check for membership in 3 groups?  Or membership
> in a group OR a certain permission?  Is that possible?

It's simple python syntax insind the py:if. So you check for several 
groups like this

"g1" in tg.identity.groups or "g2" in identity.groups

And the same with permissions. It's just the expression-part of a 
python-if-clause there.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to