Thanks Christoph.  Sorry for confusing things by saying
flash.static_template is css.  Obviously it is html.

I'm not great at css, but I think I see how I could have used it more
to my advantage. I guess I didn't think of changing the css to match
what TG does.  For some reason, my thinking went the other way
around.

I am adding a clickable element inside the flash div for closing the
notification, so I had to add that to the flash html by modifying the
template.  I also have a new notification called "information" that
isn't built into TG.  Does passing the second argument to flash() just
pass that right along as the css class?  If that is true, then I could
have just created the "information" css class and then started passing
that argument in to get the desired effect.

Thanks for your help.

~Sean

On Aug 31, 4:54 am, Christoph Zwerschke <[email protected]> wrote:
> Am 31.08.2011 02:32 schrieb Sean DiZazzo:
>
> > I finally figured out that I could customize the flash() css by
> > setting flash.static_template in my controllers.
>
> You can customize the flash *HTML* by setting flash.static_template, but
> this is rarely needed. To customize the *CSS*, you just have to add css
> rules for "#flash" and maybe different rules for "#flash .info", "#flash
> .warning" and "#flash .error" classes etc. as you like.
>
>  > It works great...except for when flash messages are created by the
>  > predicates.  Unfortunately, the predicate.has_permission() function,
>  > does not accept a real flash object, so it must be creating it
>  > somewhere along the way with a hard-coded value.
>
> Yes, the repoze.what authorization errors are hardcoded with 'error' or
> 'warning' status class. Other authorization errors use the status
> attribute of the erros instance.
>
> -- Christoph

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