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
d37d9228
Commit
d37d9228
authored
Aug 01, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor template engine doc enhancement
parent
76b52992
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
tutorial-template-engines.md
docs/guide/tutorial-template-engines.md
+9
-3
No files found.
docs/guide/tutorial-template-engines.md
View file @
d37d9228
...
@@ -56,7 +56,7 @@ return $this->render('renderer.twig', ['username' => 'Alex']);
...
@@ -56,7 +56,7 @@ return $this->render('renderer.twig', ['username' => 'Alex']);
### Template syntax
### Template syntax
The best resource to learn Twig basics is its official documentation you can find at
The best resource to learn Twig basics is its official documentation you can find at
[
twig.sensiolabs.org
](
http://twig.sensiolabs.org/documentation
)
. Additionally there are Yii-specific
addt
ions
[
twig.sensiolabs.org
](
http://twig.sensiolabs.org/documentation
)
. Additionally there are Yii-specific
syntax extens
ions
described below.
described below.
#### Method and function calls
#### Method and function calls
...
@@ -271,7 +271,13 @@ or `$this->renderPartial()` controller calls:
...
@@ -271,7 +271,13 @@ or `$this->renderPartial()` controller calls:
return
$this
->
render
(
'renderer.tpl'
,
[
'username'
=>
'Alex'
]);
return
$this
->
render
(
'renderer.tpl'
,
[
'username'
=>
'Alex'
]);
```
```
### Additional functions
### Template syntax
The best resource to learn Smarty template syntax is its official documentation you can find at
[
www.smarty.net
](
http://www.smarty.net/docs/en/
)
. Additionally there are Yii-specific syntax extensions
described below.
#### Additional functions
Yii adds the following construct to the standard Smarty syntax:
Yii adds the following construct to the standard Smarty syntax:
...
@@ -281,7 +287,7 @@ Yii adds the following construct to the standard Smarty syntax:
...
@@ -281,7 +287,7 @@ Yii adds the following construct to the standard Smarty syntax:
Internally, the
`path()`
function calls Yii's
`Url::to()`
method.
Internally, the
`path()`
function calls Yii's
`Url::to()`
method.
### Additional variables
###
#
Additional variables
Within Smarty templates, you can also make use of these variables:
Within Smarty templates, you can also make use of these variables:
...
...
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