How to include another template with Chameleon?

427 Views Asked by At

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!

1

There are 1 best solutions below

1
fat fantasma On

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.