?? ??
capture ??
???:
{capture name="foo"}? {/capture} ??? ?? ???? ?? ?? ???? ???? $foo ??? ?????.
???? ??????.
$smarty.capture.foo? ? ??? ?????.
name ??? ???? ??? ??? ????? "default"? ?????.
{capture}? ??? ???? ???. ?, ? ??? ??? ? ????.
test.html:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>{#pageTitle#}</title> </head> <body> {capture name=banner} {include file="./test1.html"} {/capture} {$smarty.capture.banner} </body> </html>
test1.html:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> 1111111111111111 </body> </html>
?? ??:
1111111111111111