Summary
In this chapter, we constructed an extremely simple application to demonstrate:
How to install the Yii Framework
How to use the
yiiccommand to bootstrap the creation of a new Yii applicationHow to use the
yiiccommand to create a new controller within the applicationHow Yii turns incoming requests into calls to your code
How to create dynamic content within a controller and have it accessible to the view files for display to the browser
How to link internal application pages together
We have demonstrated ways to link web pages together in our simple application. One approach added an HTML <a> tag directly to the view file and hardcoded the URL structure. The other (preferred approach) made use of Yii's CHtml helper class to help construct the URLs based on controllerID
/
actionID pairs, so that the resulting format will always conform to the application configuration. This way, we can easily alter the URL format throughout the application without having to go back and change...