From a4118e369eb0f7257df590f9c319c0bda80f6c52 Mon Sep 17 00:00:00 2001 From: AnrDaemon Date: Wed, 17 Mar 2021 12:41:50 +0300 Subject: [PATCH] Fixed append/prepend examples order --- .../language-function-block.xml | 72 ++++++++++++------- .../language-function-block.xml | 67 ++++++++++------- 2 files changed, 87 insertions(+), 52 deletions(-) diff --git a/docs/en/designers/language-builtin-functions/language-function-block.xml b/docs/en/designers/language-builtin-functions/language-function-block.xml index 52cfc01..18bece1 100644 --- a/docs/en/designers/language-builtin-functions/language-function-block.xml +++ b/docs/en/designers/language-builtin-functions/language-function-block.xml @@ -12,8 +12,8 @@ Optionally {block} areas of child and parent templates can be merged into each other. You can append or prepend the parent {block} - content by using the append or prepend option flag with the childs {block} definition. With the {$smarty.block.parent} the {block} content - of the parent template can be inserted at any location of the child {block} content. {$smarty.block.child} inserts the {block} content of + content by using the append or prepend option flag with the childs {block} definition. With the {$smarty.block.parent} the {block} content + of the parent template can be inserted at any location of the child {block} content. {$smarty.block.child} inserts the {block} content of the child template at any location of the parent {block}. {blocks}'s can be nested. @@ -49,7 +49,7 @@ - + Option Flags (in child templates only): @@ -65,15 +65,15 @@ append The {block} content will be be appended to the content of the parent template {block} - + prepend The {block} content will be prepended to the content of the parent template {block} - + hide Ignore the block content if no child block of same name is existing. - + nocache Disables caching of the {block} content @@ -81,7 +81,7 @@ - + Simple <varname>{block}</varname> example @@ -99,7 +99,7 @@ child.tpl ]]> - + - + - Prepend <varname>{block}</varname> example + Append <varname>{block}</varname> example parent.tpl - {block name="title"}Title - {/block} + {block name="title"}Title{/block} ]]> @@ -132,10 +132,8 @@ Page Title child.tpl The result would look like @@ -147,11 +145,11 @@ Page Title ]]> - + - Append <varname>{block}</varname> example + Prepend <varname>{block}</varname> example parent.tpl child.tpl @@ -180,9 +178,9 @@ Page Title ]]> - + - + <varname>{$smarty.block.child}</varname> example parent.tpl @@ -193,12 +191,22 @@ Page Title {block name="title"}The {$smarty.block.child} was inserted here{/block} +]]> + + or using {child} macro + + + + {block name="title"}The {child} was inserted here{/block} + + ]]> child.tpl ]]> - + + <varname>{$smarty.block.parent}</varname> example parent.tpl @@ -230,10 +239,19 @@ Child Title child.tpl + + or using {parent} macro + + The result would look like @@ -245,9 +263,9 @@ You will see now - {$smarty.block.parent} - here ]]> - + - + See also Template Inheritance, diff --git a/docs/ja/designers/language-builtin-functions/language-function-block.xml b/docs/ja/designers/language-builtin-functions/language-function-block.xml index 8024fb2..c40796e 100644 --- a/docs/ja/designers/language-builtin-functions/language-function-block.xml +++ b/docs/ja/designers/language-builtin-functions/language-function-block.xml @@ -58,7 +58,7 @@ - + オプションのフラグ (子テンプレートのみ) @@ -74,15 +74,15 @@ append {block} のコンテンツを親テンプレートの {block} に追記する - + prepend {block} のコンテンツを親テンプレートの {block} の前に置く - + hide 同じ名前の子ブロックが存在しないときに、ブロックのコンテンツを無視する - + nocache {block} のコンテンツのキャッシュを無効にする @@ -90,7 +90,7 @@ - + シンプルな <varname>{block}</varname> の例 @@ -108,7 +108,7 @@ child.tpl ]]> - + - + - <varname>{block}</varname> を前に置く例 + <varname>{block}</varname> を後に置く例 parent.tpl - {block name="title"}Title - {/block} + {block name="title"}Title{/block} ]]> @@ -141,10 +141,8 @@ Page Title child.tpl 結果は、このようになります。 @@ -156,11 +154,11 @@ Page Title ]]> - + - <varname>{block}</varname> を後に置く例 + <varname>{block}</varname> を前に置く例 parent.tpl child.tpl @@ -189,9 +187,9 @@ Page Title ]]> - + - + <varname>{$smarty.block.child}</varname> の例 parent.tpl @@ -202,12 +200,22 @@ Page Title {block name="title"}The {$smarty.block.child} was inserted here{/block} +]]> + + or using {child} macro + + + + {block name="title"}The {child} was inserted here{/block} + + ]]> child.tpl ]]> - + <varname>{$smarty.block.parent}</varname> の例 @@ -239,10 +247,19 @@ Child Title child.tpl + + or using {parent} macro + + 結果は、このようになります。 @@ -254,9 +271,9 @@ You will see now - {$smarty.block.parent} - here ]]> - + - + テンプレートの継承、 $smarty.block.parent