Skip to content

Commit c08343a

Browse files
Benjamin Schultzbschultz
authored andcommitted
Fix route prefix
Regarding best practices, the bundle routes must be prefixed with the bundle alias.
1 parent ac0add4 commit c08343a

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

config/routing/documentation.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
66

7-
<route id="_documentation_home" path="/">
7+
<route id="twig_doc_home" path="/">
88
<default key="_controller">twig_doc.controller.documentation::index</default>
99
</route>
10-
<route id="_documentation_invalid_components" path="/invalid">
10+
<route id="twig_doc_invalid_components" path="/invalid">
1111
<default key="_controller">twig_doc.controller.documentation::invalidComponents</default>
1212
</route>
13-
<route id="_documentation_component_view" path="/component-view">
13+
<route id="twig_doc_component_view" path="/component-view">
1414
<default key="_controller">twig_doc.controller.documentation::componentView</default>
1515
</route>
1616

templates/component/_item.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
<div>
2121
<h4>Category</h4>
2222
<p>
23-
<a href="{{ path('_documentation_home', {'filterQuery': component.mainCategory.name, 'filterType': 'category'}) }}">{{ component.mainCategory.name }}</a>
23+
<a href="{{ path('twig_doc_home', {'filterQuery': component.mainCategory.name, 'filterType': 'category'}) }}">{{ component.mainCategory.name }}</a>
2424
</p>
2525
</div>
2626
<div>
2727
<h4>Sub-Category</h4>
2828
{% if component.category.parent %}
2929
<p>
30-
<a href="{{ path('_documentation_home', {'filterQuery': component.category.name, 'filterType': 'sub_category' }) }}">
30+
<a href="{{ path('twig_doc_home', {'filterQuery': component.category.name, 'filterType': 'sub_category' }) }}">
3131
{{ component.category.name }}
3232
</a>
3333
</p>
@@ -39,7 +39,7 @@
3939
<h4>Tags</h4>
4040
{% for tag in component.tags %}
4141
<p>
42-
<a href="{{ path('_documentation_home', {'filterQuery': tag, 'filterType': 'tag'}) }}">{{ tag }}</a>
42+
<a href="{{ path('twig_doc_home', {'filterQuery': tag, 'filterType': 'tag'}) }}">{{ tag }}</a>
4343
</p>
4444
{% endfor %}
4545
</div>

templates/component/_search.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<form action="{{ path('_documentation_home') }}" method="get" name="twig_doc_search_form">
1+
<form action="{{ path('twig_doc_home') }}" method="get" name="twig_doc_search_form">
22
<label for="twig_doc_search_form_filterQuery">Search</label>
33
<input name="filterQuery" id="twig_doc_search_form_filterQuery" value="{{ filterQuery }}" autocomplete="off"/>
44
<label for="twig_doc_search_form_filterType">What</label>
@@ -11,6 +11,6 @@
1111
</select>
1212
<button type="submit" class="btn btn-primary">Search</button>
1313
{% if filterQuery %}
14-
<a href="{{ path('_documentation_home') }}">Show all</a>
14+
<a href="{{ path('twig_doc_home') }}">Show all</a>
1515
{% endif %}
1616
</form>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="twig-doc-viewport">
22
<iframe class="twig-doc-iframe"
3-
src="{{ path('_documentation_component_view', {name: component.name, data: componentData, quantity: 1}) }}"
3+
src="{{ path('twig_doc_component_view', {name: component.name, data: componentData, quantity: 1}) }}"
44
>
55
</iframe>
66
</div>

0 commit comments

Comments
 (0)