8 Jan
2003
8 Jan
'03
4:06 p.m.
Anthony Baxter wrote:
<div class="lgOther" metal:use-macro="macros/renderLinkGroup" tal:define="linkgroup python:blog.linkGroups.get('blogs')"/>
I get a keyerror on 'linkgroup' in the macro definition...
That's because the metal:use-macro replaces the entire <div> with the macro before the tal:define has a chance to do anything (it also blows away your "class" attribute). This should work if you change it to: <div tal:define="linkgroup python:blog.linkGroups.get('blogs')"> <div metal:use-macro="macros/renderLinkGroup"></div> </div> Cheers, Evan @ 4-am