metal:fill-slot

This attribute can occur only inside metal:use-macro element.

This explicitly tells PHPTAL to replace a defined slot with the content provided inside the metal:fill-slot attribute.


            <span tal:condition="logged" metal:fill-slot="news_place"><h2>user menu</h2><ul><li><a href="/user/action/inbox">inbox</a></li><li><a href="/user/action/new">new mail</a></li><li><a href="/user/action/disconnect">disconnect</a></li></ul></span>

          

Slots give the opportunity to define really customizable and reusable page templates with a simple push technology.

Warning

Slots work like variables, not like callbacks. metal:fill-slot in tal:repeat will keep overwriting same slot over and over again.