Sabtu, 19 Mei 2018

Sponsored Links

PHP Smarty Template Engine Tutorial - Part 1 - PHP Training ...
src: i.ytimg.com

Smarty is a web template system written in PHP. Smarty is primarily promoted as a tool for separation of concerns. Smarty is intended to simplify compartmentalization, allowing the front-end of a web page to change separately from its back-end. Ideally, this lowers costs and minimizes the efforts associated with software maintenance.

Smarty generates web content through the placement of special Smarty tags within a document. These tags are processed and substituted with other code. Tags are directives for Smarty that are enclosed by template delimiters. These directives can be variables, denoted by a dollar sign ($), functions, logical or loop statements. Smarty allows PHP programmers to define custom functions that can be accessed using Smarty tags.


Video Smarty (template engine)



Smarty example

Since Smarty separates PHP from HTML, there are two files -- one contains the presentation code: an HTML template, including Smarty variables and tags - {$title_text|escape} {$body_html} - which might look like this:

The business logic to use the Smarty template above could be as follows:


Maps Smarty (template engine)



Further reading

  • Hasin Hayder; J. P. Maia; Lucian Gheorghe (2006). Smarty PHP Template Programming And Applications. ISBN 978-1-904-81140-4. 

Ausgezeichnet Smarty Template Engine Tutorial Fotos ...
src: i2.wp.com


Recommendations

  • Twig (template engine)
  • Blade [1]

Smarty Development | Webdesksolution.com
src: webdesksolution.com


See also

  • Comparison of web template engines
  • Web template

04 - Template Engine - Smarty - YouTube
src: i.ytimg.com


References


php templete engine yapımı - YouTube
src: i.ytimg.com


External links

  • Official website

Source of the article : Wikipedia

Comments
0 Comments