Skip to content

Commit af479dd

Browse files
committed
step11 - Generating URLs
1 parent f2179a4 commit af479dd

File tree

3 files changed

+57
-126
lines changed

3 files changed

+57
-126
lines changed

.idea/workspace.xml

+42-113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Resources/views/genus/show.html.twig

+14-12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
<h2 class="genus-name">{{ name }}</h2>
88

9+
<a href="{{ path('genus_show_notes', {'genusName': name}) }}">Json Notes</a>
10+
911
<div class="sea-creature-container">
1012
<div class="genus-photo"></div>
1113
<div class="genus-details">
@@ -25,22 +27,22 @@
2527
</div>
2628
<section id="cd-timeline">
2729

28-
{% for note in notes %}
30+
{#{% for note in notes %}#}
2931

30-
<div class="cd-timeline-block">
31-
<div class="cd-timeline-img">
32-
<img src="{{ asset('images/leanna.jpeg') }}" class="img-circle" alt="Leanna!">
33-
</div>
34-
<div class="cd-timeline-content">
35-
<h2><a href="#">AquaPelham</a></h2>
32+
{#<div class="cd-timeline-block">#}
33+
{#<div class="cd-timeline-img">#}
34+
{#<img src="{{ asset('images/leanna.jpeg') }}" class="img-circle" alt="Leanna!">#}
35+
{#</div>#}
36+
{#<div class="cd-timeline-content">#}
37+
{#<h2><a href="#">AquaPelham</a></h2>#}
3638

37-
<p>{{ note }}</p>
39+
{#<p>{{ note }}</p>#}
3840

39-
<span class="cd-date">Dec. 10, 2015</span>
40-
</div>
41-
</div>
41+
{#<span class="cd-date">Dec. 10, 2015</span>#}
42+
{#</div>#}
43+
{#</div>#}
4244

43-
{% endfor %}
45+
{#{% endfor %}#}
4446

4547
</section>
4648
{% endblock %}

src/AppBundle/Controller/GenusController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function showAction($genusName)
3232
}
3333

3434
/**
35-
* @Route("/genus/{genusName}/notes")
35+
* @Route("/genus/{genusName}/notes", name="genus_show_notes")
3636
* @Method("GET")
3737
*/
3838
public function getNotesAction($genusName)

0 commit comments

Comments
 (0)