How is smarty used? Summarize Smarty Instance Usage

Source: Internet
Author: User
Tags smarty template yii zend framework
The YII framework allows developers to write a view of a controller or a pendant using their preferred template syntax (for example, Prado, Smarty). This can be accomplished by writing and installing a viewrenderer application component. This view renderer intercepts cbasecontroller::renderfile calls, compiles the view file with custom template syntax, and then renders the final compilation result. Info: Custom template syntax is recommended only when you write a view that is rarely reused. Otherwise, reusing the view in your app will force the same template syntax. Next, we'll show you how to use Cpradoviewrenderer, a view renderer similar to the Prado framework, that allows developers to use custom template syntax. If you want to develop your own view renderer, Cpradoviewrenderer is a good guide. 1. Using Cpradoviewrendererto use Cpradoviewrenderer, W

1.10 content Recommendations for custom templates

Summary: The YII framework allows developers to write a view of a controller or a pendant using their preferred template syntax (for example, Prado, Smarty). This can be accomplished by writing and installing a viewrenderer application component. This view renderer intercepts cbasecontroller::renderfile calls, compiles the view file with custom template syntax, and then renders the final compilation result. info:  Custom template syntax is recommended only when the views you write are rarely reused. Otherwise, in ...

2.10 articles on the title page

Introduction: As a walking lake for many years old traditional Chinese medicine, today ordered to solve a case of the front-end page display slow problem. The situation of the problem page is as follows: Apache + PHP using smarty Template output content page final output content is larger, 80k+ page execution time at 500ms above the magic weapon xhprof to the problem page to do a detailed inspection, found that the bottleneck of the page is a template (compiled) An echo statement in which the ECHO statement outputs a larger string, presumably 50k+ bytes, and takes more than 400 milliseconds to account for the entire page ...

3.10 article Recommendations on template syntax

Summary: The YII framework allows developers to write a view of a controller or a pendant using their preferred template syntax (for example, Prado, Smarty). This can be accomplished by writing and installing a viewrenderer application component. This view renderer intercepts cbasecontroller::renderfile calls, compiles the view file with custom template syntax, and then renders the final compilation result. info:  Custom template syntax is recommended only when the views you write are rarely reused. Otherwise, in ...

4. Development of micro-news systems

Introduction: First, the system explained "experience the depth of the square", the development of the system is mainly to learn, straighten out the process of system development, the theory and practice of further integration, which is also an important step in the introduction of PHP learning milestone. Development environment: apache2.0+php5.4+mysql5.5 Development tools: Text Editor (Dreamweaver/editplus) ii. Application of system development point 1.smarty 2. Background membership, authorization Verification 3. Encapsulation of objects and classes III. classification of system modules 1.MyS ...

5. Detailed application of PHP file cache smarty Template

Introduction: First, use the cache to turn on the Smarty cache, just set caching to True, and specify Cache_dir. Use Cache_lefetime to specify the cache lifetime, in seconds to generate multiple different caches on the same page, add a second parameter cache_id to display or fetch, such as $smarty-display (' Index.tpl ', $my _ CACHE_ID); This property goes to: http://www.php

6. PHP use Smarty to do a simple message system

Description: Message is an example of the previous use of PHP, and now put it in smarty template to do

7. Yii Framework Official Guide Series 49--topic: Using non-mainstream template syntax

Summary: The YII framework allows developers to use their preferred template syntax (such as Prado,smarty) to write a view of a controller or a pendant. This can be achieved by writing and installing a viewrenderer application component. This view renderer intercepts CB ...

8. Analysis and resolution of temporary file problems arising from Apache 500 error

Introduction: Recently always found that CentOS under the various problems of PHP, first smarty Big point on the interruption of execution, and then, the speed seems to slow, to tonight ... , and finally struck the--500 internal error.

9. PHP based on the method of using Smarty template in Yii framework

Introduction: This article is to use the Smarty template in the Yii framework of the method of a detailed analysis of the introduction, the need for a friend reference

Zend Framework+smarty Usage Examples

Introduction: This article mainly introduced the Zend Framework+smarty usage, combined with the example form detailed analysis Zend Framework Framework Integration Smarty template specific steps and related implementation skills, the need for friends can refer to the following

"Related question and answer recommendation":

Why did Php-smarty report this mistake? Does the error in CSS also concern the template engine?

PHP smarty Template, MVC framework mode, thinkphp framework will not work, good trouble!!

Why does the Smarty template have no output in PHP-TP?

PHP-About templating MVC

Javascript-webpack How to build vue?

Related Article

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.