[Cubicweb] CtxComponent and selectors

St├ęphane Bugat stephane.bugat at free.fr
Tue Oct 2 14:44:18 CEST 2012

Dear Logilab lovers,

I have a difficulty to add a CtxComponent to some specific views. I use the 'match_view' selector like this::

class MessageToolbarComponent(CtxComponent):
    """display a toolbar of actions for messages and conversations"""
    __regid__ = 'message_toolbar'
    __select__ = (
        CtxComponent.__select__ & match_user_groups('users') &
        ( is_instance('MessageNotification') | match_view('all_conversations_view') |
    context = 'ctxtoolbar'

    def render_body(self, w):

However, the component is only displayed when in the primary view of a MessageNotification instance... and not in the specified views (both views are Entity views). What's wrong with my selector?

Thanks in advance


More information about the Cubicweb mailing list