Hello
I'm new to Zope 3, and I'm trying out z3c.macro. I can't seem to get my
macro to work with a view class instead of just a page template

I've registered the macro

    <z3c:macro
      template="template.pt"
      name="my_macro"
      view=".classes.MyClass"
    />


My view

class MyClass:
    def MyFunction(self):
        #do something



My page template

<metal:block define-macro="my_macro">
  My text
  <div tal:content="view/MyFunction" />
      some text again
  </div>
</metal:block>


Unfortunately, I get a component lookup error. Am I using the wrong method
to create the view class?

Regards,

Mikael M
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to