Skip to content

Commit 0a85992

Browse files
author
Maxime Dizerens
committed
Wrong section :=)
1 parent b696300 commit 0a85992

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

views/home.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ Typically, a route or controller will request data from a model that the view ne
9191

9292
$view['name'] = 'James';
9393
$view['email'] = '[email protected]';
94+
95+
#### Share a value in each view into your application
96+
97+
<div class="content">
98+
<?php View::share('key', 'value'); ?>
99+
</div>
94100

95101
<a name="nesting-views"></a>
96102
## Nesting Views
@@ -114,12 +120,6 @@ Sometimes you may wish to directly include a view from within another view. You
114120
<div class="content">
115121
<?php echo render('user.profile'); ?>
116122
</div>
117-
118-
#### Share a value everywhere in your application's views
119-
120-
<div class="content">
121-
<?php View::share('key', 'value'); ?>
122-
</div>
123123

124124
It is also very common to have a partial view that is responsible for display an instance of data in a list. For example, you may create a partial view responsible for displaying the details about a single order. Then, for example, you may loop through an array of orders, rendering the partial view for each order. This is made simpler using the **render_each** helper:
125125

0 commit comments

Comments
 (0)