Skip to content

Commit a30b0e3

Browse files
committed
proofing myself
1 parent fffc685 commit a30b0e3

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

templating.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,27 @@ code.
1818
Rendering a Template
1919
--------------------
2020

21-
Typically, you'll render a template from inside if your controller::
21+
Typically, you'll render a template from inside of your controller::
2222

2323
// src/AppBundle/Controller/LuckyController.php
24-
2524
public function numberAction()
2625
{
2726
$number = mt_rand(0, 10);
2827

2928
// renders app/Resources/views/lucky/number.html.twig
3029
return $this->render('lucky/number.html.twig', array(
31-
// pass a variable called randomNumber into the template
30+
// pass two variables into your template
3231
'randomNumber' => $number,
3332
'people' => array('Javier', 'Christian, 'Wouter')
3433
))
3534
}
3635

3736
This template passes two variables - ``randomNumber`` and ``people`` into your
38-
template. A very simple template, might look like this:
37+
template. A very simple template might look like this:
3938

4039
.. code-block:: html+twig
4140

4241
{# app/Resources/views/lucky/number.html.twig #}
43-
4442
<h1>Your lucky number: {{ randomNumber }}</h1>
4543

4644
<h3>Nice People:</h3>
@@ -63,7 +61,7 @@ Of course, this is only the beginning! Keep reading to learn more about
6361
Twig Templates
6462
--------------
6563

66-
Symfony packages an powerful templating language called `Twig`_. With Twig, you can
64+
Symfony packages a powerful templating language called `Twig`_. With Twig, you can
6765
write concise, readable templates that are friendly to web designers and more powerful
6866
than traditional PHP templates:
6967

@@ -212,7 +210,7 @@ Check it out:
212210
</body>
213211
</html>
214212

215-
This template defines a really basic HTML skeleton, which you should improve and
213+
This template defines a basic HTML skeleton, which you should improve and
216214
customize for your project. It also defines four **blocks**, identified with
217215
``{% block %}`` (``title``, ``stylesheets``, ``body`` & ``javascripts``).
218216

@@ -756,8 +754,8 @@ advantage of Symfony's template inheritance.
756754

757755
Your ``base.html.twig`` base template already holds two blocks - ``stylesheets`` inside
758756
the ``head`` tag and another called ``javascripts`` just above the closing ``body``
759-
tag that are meant to hold your stylesheets and JavaScripts. Suppose first that
760-
you want include ``main.css`` and ``main.js`` files on every page on your site:
757+
tag - that are meant to hold your stylesheets and JavaScripts. Suppose first that
758+
you want to include ``main.css`` and ``main.js`` files on every page on your site:
761759

762760
.. configuration-block::
763761

0 commit comments

Comments
 (0)