Skip to content

Commit 8b1938c

Browse files
authored
Merge pull request #60 from openclassify/update-sections
Update search-box.twig
2 parents 336795b + e12b40b commit 8b1938c

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

resources/views/partials/search-box.twig

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@
66
<div class="dropdown-menu results" style="max-height: 800px;overflow-x: auto;">
77
{% set moduleName = "" %}
88
{% for key, navigation in template.cp.navigation %}
9-
10-
{% if moduleName != trans(navigation.breadcrumb) %}
11-
<a style="color: {{ setting_value('visiosoft.theme.defaultadmin::primary_color') }}!important;"
12-
class="dropdown-item" {{ html_attributes(navigation.attributes) }} {{ navigation.class }}>
9+
<a style="color: {{ setting_value('visiosoft.theme.defaultadmin::primary_color') }}!important;"
10+
class="dropdown-item" {{ html_attributes(navigation.attributes) }} {{ navigation.class }}>
1311
<span class="title">
1412
{{ trans(navigation.breadcrumb) }}
1513
</span>
16-
</a>
17-
{% endif %}
18-
19-
<a class="dropdown-item" {{ html_attributes(navigation.attributes) }} {{ navigation.class }}>
20-
21-
<span class="title">
22-
- {{ trans(navigation.title) }}
23-
<span style="color:transparent; font-size: 14px;"> ( {{ trans(navigation.breadcrumb) }} ) </span>
24-
25-
</span>
2614
</a>
27-
{% set moduleName = trans(navigation.breadcrumb) %}
15+
16+
{% set sections = getSections(navigation.slug) %}
17+
{% for section in sections['main'] %}
18+
<a class="dropdown-item" href="{{ section.href }}">
19+
<span class="title">
20+
- {{ trans(section.title) }}
21+
<span style="color:transparent; font-size: 14px;"> ( {{ trans(navigation.breadcrumb) }} ) </span>
22+
</span>
23+
</a>
24+
{% endfor %}
2825
{% endfor %}
2926
</div>
30-
</form>
27+
</form>

0 commit comments

Comments
 (0)