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
e3afb88a
Commit
e3afb88a
authored
Nov 20, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6125 from xpardan/patch-3
fix
parents
8039026a
2f446d89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
structure-views.md
docs/guide-zh-CN/structure-views.md
+1
-1
No files found.
docs/guide-zh-CN/structure-views.md
View file @
e3afb88a
...
...
@@ -218,7 +218,7 @@ echo \Yii::$app->view->renderFile('@app/views/site/license.php');
例如
`//site/about`
对应到
`@app/views/site/about.php`
。
*
视图名以单斜杠
`/`
开始,视图文件路径以当前使用
[
模块
](
structure-modules.md
)
的
[
[yii\base\Module::viewPath|view path
]
]开始,
如果不存在模块,使用
`@app/views/ViewName`
开始,例如,如果当前模块为
`user`
,
`/user/create`
对应成
`@app/modules/user/views/user/create.php`
, 如果在模块中,
`/user/create`
对应
`@app/views/user/create.php`
。
`@app/modules/user/views/user/create.php`
, 如果
不
在模块中,
`/user/create`
对应
`@app/views/user/create.php`
。
*
如果
[
[yii\base\View::context|context
]
] 渲染视图 并且上下文实现了
[
[yii\base\ViewContextInterface
]
],
视图文件路径由上下文的
[
[yii\base\ViewContextInterface::getViewPath()|view path
]
] 开始,
这种主要用在控制器和小部件中渲染视图,例如
...
...
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