The examples in this article describe common statements for twig templates. Share to everyone for your reference, as follows:
Recently written static pages need to set Symfony template, so will use the Twig template statement to do a summary: hope to help beginners.
The code structure is as follows:
{% extends ':: L_sh_base.html.twig '%}//introduced base template {% block title%}//Page title Merchant Center-Repair category {% Endblock%}{% block stylesheets%}// Introduced CSS or JS file {{parent ()}}
{% endblock%}{% block header%}//Page header contents {{parent ()}}{% endblock%}{% block body%}/ /page Body contents
{% for item in appliance%}//for Loop statement {{Item.appliance_name}}{% endfor%}src= ' {{Asset (' Image/appliance /')}}{{Item.image}} "//Picture Path {{path (' Zm_shop_appliance_add ')}}//href jump path {% if Item.status = 1} //if statement class=" Mar Quee "{% endif%}{% endblock%}{% block footer%}//page bottom content {{parent ()}}{% Endblock%}
Note that you cannot write HTML annotations outside of%
Permanent address of this article:http://blog.it985.com/12383.html
This article is from IT985 blog, please indicate the source and corresponding link when reproduced.
More about PHP template related content readers can view the site topics: "PHP Template Technology Summary", "Smarty Template Primer Basic Tutorial", "CodeIgniter Introductory Tutorial" and "thinkphp Introductory tutorial"
I hope this article is helpful to you in PHP programming.