Get, post, request, cookie, Session variable usage in Smarty templates

Source: Internet
Author: User
Tags smarty template
  1. {$smarty. Now|date_format: "%y-%m-%d%h:%m:%s"}
Copy Code

2.{$smarty. Const} can access PHP constants directly. For example

  1. {$smarty. Const._my_const_val}
Copy Code

3.{$smarty. Capture} can be obtained through {capture}. The output of the {/CAPTURE} structure interception can be accessed using the {$smarty} variable.

4.{$smarty. config}{$smarty} variable can access the already loaded config variable such as {$smarty. Config.foo} to represent {#foo #}

5.{$smarty. Section}, {$smarty. foreach} {$smarty} variable can access the properties of the ' section ' and ' foreach ' Loops

6.{$smarty. Template} Displays the names of the templates currently being processed

7.{$smarty. Version} to display the Smarty template's release 8. {$smarty. Ldelim} shows left delimiter 9. {$smarty. Rdelim} display right delimiter

  • 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.