Discuz template syntax, discuz template _php Tutorial

Source: Internet
Author: User
Tags code tag

Discuz template syntax, discuz template


discuz! The parsing of the X-template is mainly the./source/class/class_template.php file parsing process, if you need further information please take a look at this file!

  • Execute the PHP code tag directly:

    Equivalent
    Equivalent
    Equivalent
    Equivalent
    Equivalent
  • Direct output variables, equivalent to PHP , curly braces can be omitted but not recommended to remove. (The module program is processed before it can be called here):

      $announcements
    //Normally output is not a simple variable
    Conditions of Use: 1-the variable needs to be processed by the function 2-the output is a variable, not an array
  • Embed point code for ads:

    This is discuz embedded ads, we recommend that you customize the ad bit, the custom ad bit in the background will automatically generate the call code, we just paste copy to
  • Plug-in Hook tags:


    Hook as a keyword, meaning to define index_top as a hook
  • Looping syntax (multiple loops possible)

    Loop notation with array keys

    HTML statements for looping output


    Loop notation with no array keys

    HTML statements for looping output
  • DIY zone and background data call Tags:

    Try to avoid the use of Discuz DIY features, because maintenance people are very large, can directly through the background custom module or module code
    {Block XXX}(data call module)
  • discuz! After the language pack is loaded, use in the template file:

    {lang Forum_category_modedby}
    Where language packs are stored in the./source/language/directory, in the form of an array of PHP
  • http://www.bkjia.com/PHPjc/988270.html www.bkjia.com true http://www.bkjia.com/PHPjc/988270.html techarticle Discuz template syntax, Discuz template discuz! The parsing of the X-template is mainly the./source/class/class_template.php file parsing process, if you need further information please take a look at this file! ...

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