Thinkphp template inheritance

Source: Internet
Author: User
Template inheritance: (blockname & amp; #39; top & amp; #39;) (/block )(! -- This is the parent template --) (divstyle & amp; #39; border: 1 pxsolidgray; background: # abcdef; height: 100px ;...

Template inheritance:

  1. (Block name = 'top') (/block )(! -- This is the parent template --)
  2. (Div style = 'border: 1px solid gray; background: # abcdef; height: 100px; ') ad part (/div)
  3. (Block name = 'body') (/block)
  4. (Div style = 'border: 1px solid gray; background: # abcdef; height: 100px; ') ad part (/div)
  5. (Extend name = 'public: base '/)(! -- Inherit base parent template --)
  6. (Block name = 'top ')
  7. (Include file = 'public: header '/)
  8. (/Block)
  9.  
  10. (Block name = 'body ')(! -- This is the parent template --)
  11. (Body)
  12. (P) here is the rendering page !!! (/P)
  13. {__ CONTENT __}
  14. (/Body)
  15. (/Html)
  16. (/Block)

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.