<br>Hello<br>I&#39;m new to Zope 3, and I&#39;m trying out z3c.macro. I can&#39;t seem to get my macro to work with a view class instead of just a page template<br><br>I&#39;ve registered the macro<br><br>&nbsp;&nbsp;&nbsp; &lt;z3c:macro
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; template=&quot;<a href="http://template.pt">template.pt</a>&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;my_macro&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view=&quot;.classes.MyClass&quot; <br>&nbsp;&nbsp;&nbsp; /&gt;<br><br><br>My view<br><br>class MyClass:<br>&nbsp;&nbsp;&nbsp; def MyFunction(self):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #do something<br><br><br><br>My page template <br><br>&lt;metal:block define-macro=&quot;my_macro&quot;&gt;<br>&nbsp; My text<br>&nbsp; &lt;div tal:content=&quot;view/MyFunction&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; some text again<br>&nbsp; &lt;/div&gt;
<br>&lt;/metal:block&gt;<br><br><br>Unfortunately, I get a component lookup error. Am I using the wrong method to create the view class?<br><br>Regards,<br><br>Mikael M<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>