<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ``set`` ======= Inside code blocks you can also assign values to variables. Assignments use the ``set`` tag and can have multiple targets. Here is how you can assign the ``bar`` value to the ``foo`` variable: .. code-block:: jinja {% set foo = 'bar' %} After the ``set`` call, the ``foo`` variable is available in the template like any other ones: .. code-block:: jinja {# displays bar #} {{ foo }} The assigned value can be any valid :ref:`Twig expressions <twig-expressions>`: .. code-block:: jinja {% set foo = [1, 2] %} {% set foo = {'foo': 'bar'} %} {% set foo = 'foo' ~ 'bar' %} Several variables can be assigned in one block: .. code-block:: jinja {% set foo, bar = 'foo', 'bar' %} {# is equivalent to #} {% set foo = 'foo' %} {% set bar = 'bar' %} The ``set`` tag can also be used to 'capture' chunks of text: .. code-block:: jinja {% set foo %} <div id="pagination"> ... </div> {% endset %} .. caution:: If you enable automatic output escaping, Twig will only consider the content to be safe when capturing chunks of text. .. note:: Note that loops are scoped in Twig; therefore a variable declared inside a ``for`` loop is not accessible outside the loop itself: .. code-block:: jinja {% for item in list %} {% set foo = item %} {% endfor %} {# foo is NOT available #} If you want to access the variable, just declare it before the loop: .. code-block:: jinja {% set foo = "" %} {% for item in list %} {% set foo = item %} {% endfor %} {# foo is available #}
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看