From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- user_guide/general/views.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'user_guide/general/views.html') diff --git a/user_guide/general/views.html b/user_guide/general/views.html index d4ccb5148..602d58255 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -12,7 +12,7 @@ @@ -63,11 +63,11 @@ Views

Views

A view is simply a web page, or a page fragment, like a header, footer, sidebar, etc. -In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type +In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type of hierarchy.

Views are never called directly, they must be loaded by a controller. Remember that in an MVC framework, the Controller acts as the -traffic cop, so it is responsible for fetching a particular view. If you have not read the Controllers page +traffic cop, so it is responsible for fetching a particular view. If you have not read the Controllers page you should do so before continuing.

Using the example controller you created in the controller page, let's add a view to it.

@@ -120,7 +120,7 @@ class Blog extends Controller {

Adding Dynamic Data to the View

-

Data is passed from the controller to the view by way of an array or an object in the second +

Data is passed from the controller to the view by way of an array or an object in the second parameter of the view loading function. Here is an example using an array:

$data = array(
-- cgit v1.2.3-24-g4f1b