qingkejin
qingkejin

Reputation: 819

How to include another template with Chameleon?

I'm using the latest Chameleon in latest Pyramid. Sometimes I want to let a template include another template. With PHP, I may use such as '@include('_partials.assets')', but how to use with Chameleon?

In the question How to use template inheritance with Chameleon?, I know how to inherit, but can't include yet.

Thank you!

Upvotes: 2

Views: 437

Answers (1)

fat fantasma
fat fantasma

Reputation: 7613

If I understand your question correctly your can put this line of code in your first template.

<tal metal:use-macro='load:partial_assests.pt'></tal>

"tal" could be replaced with any html tag.

Upvotes: 4

Related Questions