how to use macros with pyramid / ZPT (Chameleon)
问题 I want to use macros with pyramid+ZPT engine (Chameleon). The docs say that "A single Page Template can accommodate multiple macros." http://chameleon.readthedocs.org/en/latest/reference.html#macros-metal Thus I defined a file macros.pt : <div metal:define-macro="step-0"> <p>This is step 0</p> </div> <div metal:define-macro="step-1"> <p>This is step 1</p> </div> and a global template main_template.pt with all the html stuff defining a slot content . and a template for my view progress.pt