Usage of get, post, request, cookies, and session variables in the smarty Template

Source: Internet
Author: User
Usage of get, post, request, cookies, and session variables in the smarty Template

  1. {$ Smarty. now | date_format: "% Y-% m-% d % H: % M: % S "}

2. {$ smarty. const} can directly access PHP constants. for example:

  1. {$ Smarty. const. _ MY_CONST_VAL}

3. the output of {$ smarty. capture} can be intercepted through the {capture}... {/capture} structure and can be accessed using the {$ smarty} variable.

4. the {$ smarty. config} {$ smarty} variable can access the loaded config variable, for example, {$ smarty. config. foo}, and it can represent {# foo #}

5. variables {$ smarty. section}, {$ smarty. foreach} {$ smarty} can access the attributes of the 'coles' and 'foreach' loops.

6. {$ smarty. template} displays the name of the currently processed template.

7. {$ smarty. version} displays the version of the smarty template 8. {$ smarty. ldelim} displays the left separator 9. {$ smarty. rdelim} displays the right separator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.