Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
1b9825c3
Commit
1b9825c3
authored
Aug 08, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4648 from xBazilio/patch-7
Grammar fixes
parents
82e70be1
2bfbbf23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
structure-views.md
docs/guide/structure-views.md
+4
-4
No files found.
docs/guide/structure-views.md
View file @
1b9825c3
...
...
@@ -275,7 +275,7 @@ The controller ID is: <?= $this->context->id ?>
The push approach is usually the preferred way of accessing data in views, because it makes views less dependent
on context objects. Its drawback is that you need to manually build the data array all the time, which could
become
s
tedious and error prone if a view is shared and rendered in different places.
become tedious and error prone if a view is shared and rendered in different places.
### Sharing Data among Views <a name="sharing-data-among-views"></a>
...
...
@@ -439,7 +439,7 @@ If the layout value does not contain a file extension, it will use the default o
Sometimes you may want to nest one layout in another. For example, in different sections of a Web site, you
want to use different layouts, while all these layouts share the same basic layout that generates the overall
HTML5 page structure. You can achieve this goal by calling
with
[
[yii\base\View::beginContent()|beginContent()
]
],
HTML5 page structure. You can achieve this goal by calling
[
[yii\base\View::beginContent()|beginContent()
]
] and
[
[yii\base\View::endContent()|endContent()
]
] in the child layouts like the following:
```
php
...
...
@@ -450,7 +450,7 @@ HTML5 page structure. You can achieve this goal by calling with [[yii\base\View:
<?php
$this
->
endContent
();
?>
```
As shown above, the child layout content should be enclosed within
[
[yii\base\View::beginContent()|beginContent()
]
]
,
As shown above, the child layout content should be enclosed within
[
[yii\base\View::beginContent()|beginContent()
]
]
and
[
[yii\base\View::endContent()|endContent()
]
]. The parameter passed to
[
[yii\base\View::beginContent()|beginContent()
]
]
specifies what is the parent layout. It can be either a layout file or alias.
...
...
@@ -585,7 +585,7 @@ $this->registerMetaTag(['name' => 'keywords', 'content' => 'yii, framework, php'
```
The above code will register a "keywords" meta tag with the view component. The registered meta tag is
not rendered until
after the layout finishes rendering. By then, the following HTML code will be inserted
rendered
after the layout finishes rendering. By then, the following HTML code will be inserted
at the place where you call
[
[yii\web\View::head()
]
] in the layout and generate the following HTML code:
```
php
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment