For example there is a file container.tpl

<div class="container"> </div> 

There is also a test.tpl file

 <div class="test"> </div> 

And there is also main.tpl

 <!DOCTYPE html> <html> <body> {include 'container.tpl'} //Как ставить в container test.tpl? </body> </html> 

To make it happen

 <!DOCTYPE html> <html> <body> <div class="container"> <div class="test"> </div> </div> </body> </html> 
  • Usually it seems that in practice they turn on the contrary from the file of content they connect the heder and footer - teran

1 answer 1

As an option

container.tpl

 <div class="container"> {if $smarty.capture.content ne ''} {$smarty.capture.content} {/if} </div> 

main.tpl

 <!DOCTYPE html> <html> <body> {capture name=content} {include file='test.tpl'} {/capture} {include 'container.tpl'} </body> </html> 
  • Unfortunately not. - BigTows
  • Try this then - tarkik
  • Thanks for the option :) - BigTows