Skip to content

Commit

Permalink
add link to other products in summary box
Browse files Browse the repository at this point in the history
  • Loading branch information
pglevy committed May 4, 2021
1 parent 0b9399b commit f8ccf5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions _includes/summary-box.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ <h3 class="usa-summary-box__heading">Product Details</h3>
<li>
<a class="usa-summary-box__link" href="#planning-and-warehousing">Planning and Warehousing</a>
</li>
<li>
<a class="usa-summary-box__link" href="#other-products">Other Products in Category</a>
</li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1 class="margin-top-0">{{ page.title }}</h1>
{{ content }}

{% assign related_products = site.products | where: "category", page.category %}
<h2>Other products in {{ page.category }}</h2>
<h2 id="other-products">Other products in {{ page.category }}</h2>
<ul>
{% for product in related_products %}
{% if product.title != page.title %}
Expand Down

0 comments on commit f8ccf5e

Please sign in to comment.