File tree 1 file changed +17
-13
lines changed
1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change 8
8
< ul >
9
9
{% for item in site.data.menu %}
10
10
{% if item.subitems != null %}
11
+ < li class ="{% if current_page.last == item.slug %} active{% endif %}{% if item.subitems != null %} has-children{% endif %} ">
11
12
{% if item.url != null %}
12
13
< a href ="{{ item.url }}/ "> {{ item.title }}</ a >
13
14
{% else %}
14
- < li class ="{% if current_page.last == item.slug %} active{% endif %}{% if item.subitems != null %} has-children{% endif %} ">
15
- < a href ="{{ site.baseurl }}/{{ item.slug }}/ "> {{ item.title }}</ a > </ li >
16
- < ul >
17
- {% for subcategory in item.subitems %}
18
- < li {% if current_page.last == subcategory.subslug %} class ='active '{% endif %} > < a href ="{{ site.baseurl }}/{{ item.slug }}/{{ subcategory.subslug }}/ "> {{ subcategory.subtitle }}</ a > </ li >
19
- {% endfor %}
20
- </ ul >
21
-
15
+ < a href ="{{ site.baseurl }}/{{ item.slug }}/ "> {{ item.title }}</ a >
22
16
{% endif %}
23
17
24
-
18
+ < ul >
19
+ {% for subcategory in item.subitems %}
20
+ < li {% if current_page.last == subcategory.subslug %} class ='active '{% endif %} > < a href ="{{ site.baseurl }}/{{ item.slug }}/{{ subcategory.subslug }}/ "> {{ subcategory.subtitle }}</ a > </ li >
21
+ {% endfor %}
22
+ </ ul >
25
23
26
24
27
25
{% else %}
28
26
29
- < li {% if current_page.last == item.slug %} class ='active '{% endif %} >
30
- < a href ="{{ site.baseurl }}/{{ item.slug }} "> {{ item.title }}</ a >
31
- {% endif %}
32
- </ li >
27
+ < li {% if current_page.last == item.slug %} class ='active '{% endif %} >
28
+ {% if item.url != null %}
29
+ < a href ="{{ item.url }}/ "> {{ item.title }}</ a >
30
+ {% else %}
31
+ < a href ="{{ site.baseurl }}/{{ item.slug }}/ "> {{ item.title }}</ a >
32
+ {% endif %}
33
+ {% endif %}
34
+ </ li >
35
+
36
+
33
37
34
38
{% endfor %}
35
39
</ ul >
You can’t perform that action at this time.
0 commit comments