Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Sidenav logic creating empty sublist #376

Description

@mejiaj

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/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions