From 11de78daa3c24d0a68105fc1a8246da58a0bae4f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 31 Dec 2010 15:39:12 +0100 Subject: [PATCH] removed old recipe from the doc as macros do not output their content directly anymore --- doc/recipes.rst | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-) diff --git a/doc/recipes.rst b/doc/recipes.rst index 2099fe0..a615507 100644 --- a/doc/recipes.rst +++ b/doc/recipes.rst @@ -208,22 +208,3 @@ The output will be similar to: In the inner loop, the ``loop.parent`` variable is used to access the outer context. So, the index of the current ``topic`` defined in the outer for loop is accessible via the ``loop.parent.loop.index`` variable. - -Passing a Macro as an Argument ------------------------------- - -(new in Twig 0.9.6) - -By default, a macro directly outputs its content to the screen. If you want to -pass the content of a macro as an argument to a method or to another macro, -you can use the ``set`` tag: - -.. code-block:: jinja - - {% import "form_elements.html" as form %} - - {% set theinput %} - {{ form.input('test', 'text', 'Value') }} - {% endset %} - - {{ form.row('Label', theinput) }} -- 1.7.2.5