When calling metal:use-macro multiple times, default slots don't get
reinitialized.

This is the template :

  <!--! definition of macro with a slot -->
  <p metal:define-macro="the-macro">
    The macro : <tt metal:define-slot="the-slot">the slot</tt>
  </p>

  <!--! call macro with default slot -->
  <tal:block metal:use-macro="the-macro" />

  <!--! call macro and fill the slot -->
  <tal:block metal:use-macro="the-macro">
    <tt metal:fill-slot="the-slot">something else</tt>
  </tal:block>

  <!--! call macro with default slot : this FAIL -->
  <tal:block metal:use-macro="the-macro" />

The expected output :

<p>
    The macro : <tt>the slot</tt>
  </p>
<p>
    The macro : <tt>something else</tt>
  </p>
<p>
    The macro : <tt>the slot</tt>
  </p>

The actual result :

<p>
    The macro : <tt>the slot</tt>
  </p>
<p>
    The macro : <tt>something else</tt>
  </p>
<p>
    The macro : <tt>something else</tt>
  </p>

Do I need to do some define or something like this to get this work ?

Thanks !
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to