2

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!

Community
  • 1
  • 1
qingkejin
  • 799
  • 1
  • 5
  • 9

1 Answers1

4

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.

fat fantasma
  • 7,483
  • 15
  • 48
  • 66