hey, Beginning in a few weeks, I have been trying to program a PHP application using a smarty template solution. Now an easy question for all professionals: How can I get a template in a template? One example: index.php (page.tpl) includes my login.php (login.tpl)
In the smarty documentation, I found this function: {include file="$tpl_name.tpl"}
{include file="$tpl_name.tpl"}
But where is my login.php controller? When this function includes the login.tpl file, do I only have HTML code or?
Can someone explain this to me or give me a sample / tutorial?
Sorry for my bad english
Regards
login.tpl Smarty ( html, Smarty). Smarty.
, . :1) login.tpl index.tpl, , .2) , . "login.php", login.php , / .3) , , index.php( , ).
, : ( ) , / . login.tpl , html , , Smarty, .
- , . smarty .
<html> <head> <title>{$title}</title> </head> <body> {include file='login.tpl'}
, , .
, HTML-, , :
{include_php file='/path/to/login.php'}
Source: https://habr.com/ru/post/1785634/More articles:Pixel color matching score - cОпределение цвета с использованием цветового пространства YCrCb? - javaHow to cut URL variable - coldfusionScaling in UIScrollView with paging support and multiple images - objective-cWMI technical product - windows-7Change cell contents from another cell - javascriptHow to implement dual communication between server and client via http - httpjava: Templates for monitoring workflows? - javaВозврат по ссылке - c++Java httpclient для входа на сайт и загрузки файла - Проблемы с сеансом! - javaAll Articles