开发者

Loading Macros from Other Template Files in Chameleon

I have a Pyramid app that uses 开发者_Go百科Chameleon for its templates.

I would like to create a master template page (say master.pt) that contains several macros that I user throughout the pages of my site.

I am trying to load these macros in different templates across my application, but I can't seem to do so - Chameleon's documentation indicates the following syntax:

<div tal:define="master load: ../master.pt" metal:use-macro="master" />

But this throws an exception. What is the correct syntax for including external macros in a Chameleon template?


In case anyone was wondering, since I am using Pyramid, the usage is a little different:
http://docs.pylonsproject.org/projects/pyramid/1.0/narr/templates.html#using-zpt-macros-in-pyramid

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜