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
e75e233d
Commit
e75e233d
authored
Dec 14, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added example about configuring theme runtime
parent
fa0a3aef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
output-theming.md
docs/guide/output-theming.md
+11
-0
No files found.
docs/guide/output-theming.md
View file @
e75e233d
...
@@ -38,6 +38,17 @@ For example, with a configuration above a themed version of a view file `@app/vi
...
@@ -38,6 +38,17 @@ For example, with a configuration above a themed version of a view file `@app/vi
`@app/themes/basic/site/index.php`
. It basically replaces
`@app/views`
in
`@app/views/site/index.php`
with
`@app/themes/basic/site/index.php`
. It basically replaces
`@app/views`
in
`@app/views/site/index.php`
with
`@app/themes/basic`
.
`@app/themes/basic`
.
In order to configure theme runtime you can use the following code before rendering a view. Typically it will be
placed in controller:
```
php
$this
->
getView
()
->
theme
=
Yii
::
createObject
([
'class'
=>
'\yii\base\Theme'
,
'pathMap'
=>
[
'@app/views'
=>
'@app/themes/basic'
],
'baseUrl'
=>
'@web/themes/basic'
,
]);
```
### Theming modules
### Theming modules
In order to theme modules,
`pathMap`
may look like the following:
In order to theme modules,
`pathMap`
may look like the following:
...
...
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