Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidenav logic creating empty sublist #376

Open
mejiaj opened this issue Sep 8, 2022 · 1 comment
Open

Sidenav logic creating empty sublist #376

mejiaj opened this issue Sep 8, 2022 · 1 comment
Assignees
Labels

Comments

@mejiaj
Copy link
Contributor

mejiaj commented Sep 8, 2022

Logic in sidenav is creating an empty unordered subnav list. We should correct this to have clean markup.

{% if (_current or (page.url contains _href or page.permalink contains _href)) and link.subnav %}
<ul class="usa-sidenav__sub-list">
{% for sublink in link.subnav %}
<li>
<a href="{% if sublink.external == true %}{{ sublink.href }}{% else %}{{ sublink.href | relative_url }}{% endif %}" {% if page.url == sublink.href or page.permalink == sublink.href %}class="usa-current"{% endif %}>{{ sublink.text }}</a>
</li>
{% endfor %}
</ul>
{% endif %}

Results
image
url: https://www.plainlanguage.gov/law/page-template/

@mejiaj mejiaj added the bug label Sep 8, 2022
@nick-mon1 nick-mon1 self-assigned this Sep 9, 2022
@nick-mon1
Copy link
Contributor

This will be closed out when site is migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants