mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
new example and removed prehistoric
This commit is contained in:
@@ -51,14 +51,7 @@
|
|||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
|
|
||||||
<note>
|
|
||||||
<title>Technical Note</title>
|
|
||||||
<para>
|
|
||||||
Smarty 1.4.0 - 1.4.4 placed the captured content into the
|
|
||||||
variable named $return. As of 1.4.5, this behavior was changed to use
|
|
||||||
the name attribute, so update your templates accordingly.
|
|
||||||
</para>
|
|
||||||
</note>
|
|
||||||
<caution>
|
<caution>
|
||||||
<para>
|
<para>
|
||||||
Be careful when capturing <link
|
Be careful when capturing <link
|
||||||
@@ -96,16 +89,16 @@
|
|||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>capturing content to a variable</title>
|
<title>capturing content to a variable</title>
|
||||||
|
<para>This example also demonstrates the
|
||||||
|
<link linkend="language.function.popup">{popup}</link>
|
||||||
|
function</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* we don't want to print a table row unless content is displayed *}
|
{capture name=some_content assign=popText}
|
||||||
{capture name=banner assign=foo}
|
|
||||||
.... some content ....
|
.... some content ....
|
||||||
{/capture}
|
{/capture}
|
||||||
|
|
||||||
{if $condition}
|
<a href="#" {popup caption='Help' text=$popText}>help</a>
|
||||||
{$foo}
|
|
||||||
{/if}
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
Reference in New Issue
Block a user