>>     <div py:replace="item[:]"/>

>I *think* this replaces all of the elements in <head></head>.

"item" is the matching node from the extended template. So <div
py:replace="item[:]"/> is replaced by the children nodes of <head> from
content.kid

master.kid :
<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'">
  <style>
    blabla  ...
  </style>
  <div py:replace="item[:]"/>
</head>

+ content.kid
<head>
  <title>Foo</title>
</head>

=>

<head>
  <style>
    blabla  ...
  </style>
  <title>Foo</title>
</head>

Reply via email to