bobtemplates.plone icon indicating copy to clipboard operation
bobtemplates.plone copied to clipboard

Add a `msg` funtion to the view python class (e.g. as follows):

Open me-kell opened this issue 2 years ago • 0 comments

The template and view in bobtemplates/plone/view/views are not working together.

The template uses <p tal:content="view/msg">this gets replaced</p> but there is no msg function in the view class.

Add a msg funtion to the view python class (e.g. as follows):

def msg(self):
    return "msg from '%s'" % {{{ view_python_class_name }}}

An alternative would be to remove <p tal:content="view/msg">this gets replaced</p> from the template.

I'd prefer adding the msg function.

me-kell avatar Feb 07 '22 17:02 me-kell