Linking pages together
Typical web applications have more than one page within them for users to experience, and our simple application should be no exception. Let's add another page that displays a response from the World, 'Goodbye, Yii developer!', and link to this page from our Hello, World! page, and vice-versa.
Normally, each rendered HTML page within a Yii web application will correspond to a separate view (though this does not always have to be the case). So, we will create a new view and will use a separate action method to render this view. When adding a new page like this, we also need to consider whether or not to use a separate controller. As our Hello and Goodbye pages are related and very similar, there is no compelling reason to delegate the application logic to a separate controller class at the moment.
Linking to a new page
Let's have the URL for our new page be of the following form:
http://yourhostname/demo/index.php?r=message/goodbye
Sticking with Yii conventions, this decision...