@@ -108,9 +108,9 @@ alternating ``odd``, ``even`` classes:
108
108
.. code-block :: html+jinja
109
109
110
110
{% for i in 0..10 %}
111
- <div class="{{ cycle(['odd', 'even'], i) }}">
112
- <!-- some HTML here -->
113
- </div>
111
+ <div class="{{ cycle(['odd', 'even'], i) }}">
112
+ <!-- some HTML here -->
113
+ </div>
114
114
{% endfor %}
115
115
116
116
Throughout this chapter, template examples will be shown in both Twig and PHP.
@@ -493,7 +493,7 @@ template. First, create the template that you'll need to reuse.
493
493
<h3 class="byline">by {{ article.authorName }}</h3>
494
494
495
495
<p>
496
- {{ article.body }}
496
+ {{ article.body }}
497
497
</p>
498
498
499
499
.. code-block :: html+php
@@ -503,7 +503,7 @@ template. First, create the template that you'll need to reuse.
503
503
<h3 class="byline">by <?php echo $article->getAuthorName() ?></h3>
504
504
505
505
<p>
506
- <?php echo $article->getBody() ?>
506
+ <?php echo $article->getBody() ?>
507
507
</p>
508
508
509
509
Including this template from any other template is simple:
@@ -587,9 +587,9 @@ The ``recentList`` template is perfectly straightforward:
587
587
588
588
{# src/Acme/ArticleBundle/Resources/views/Article/recentList.html.twig #}
589
589
{% for article in articles %}
590
- <a href="/article/{{ article.slug }}">
591
- {{ article.title }}
592
- </a>
590
+ <a href="/article/{{ article.slug }}">
591
+ {{ article.title }}
592
+ </a>
593
593
{% endfor %}
594
594
595
595
.. code-block :: html+php
@@ -722,9 +722,9 @@ correctly:
722
722
723
723
{# src/Acme/ArticleBundle/Resources/views/Article/recentList.html.twig #}
724
724
{% for article in articles %}
725
- <a href="{{ path('article_show', { 'slug': article.slug }) }}">
726
- {{ article.title }}
727
- </a>
725
+ <a href="{{ path('article_show', { 'slug': article.slug }) }}">
726
+ {{ article.title }}
727
+ </a>
728
728
{% endfor %}
729
729
730
730
.. code-block :: html+php
0 commit comments