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

STRF-4679 - fixing product layout when sidebar off #1205

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Fix product layout when shop by price disabled [#1205](https://github.com/bigcommerce/cornerstone/pull/1205)
- Fix brands import statement in app.js [#1202](https://github.com/bigcommerce/cornerstone/pull/1202)
- Fix broken 403/404 page search box in mobile [#1203](https://github.com/bigcommerce/cornerstone/pull/1203)

Expand Down
40 changes: 21 additions & 19 deletions templates/components/category/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<nav>
{{#if category.subcategories}}
<div class="sidebarBlock">
<h5 class="sidebarBlock-heading">{{category.name}}</h5>
<ul class="navList">
{{#each category.subcategories}}
<li class="navList-item">
<a class="navList-action" href="{{url}}" alt="{{name}}" title="{{name}}">{{name}}</a>
</li>
{{/each}}
</ul>
</div>
{{/if}}
<aside class="page-sidebar" id="faceted-search-container">
<nav>
{{#if category.subcategories}}
<div class="sidebarBlock">
<h5 class="sidebarBlock-heading">{{category.name}}</h5>
<ul class="navList">
{{#each category.subcategories}}
<li class="navList-item">
<a class="navList-action" href="{{url}}" alt="{{name}}" title="{{name}}">{{name}}</a>
</li>
{{/each}}
</ul>
</div>
{{/if}}

{{#if category.faceted_search_enabled}}
{{> components/faceted-search/index category}}
{{else}}
{{> components/category/shop-by-price shop_by_price=category.shop_by_price category_url=category.url}}
{{/if}}
</nav>
{{#if category.faceted_search_enabled}}
{{> components/faceted-search/index category}}
{{else}}
{{> components/category/shop-by-price shop_by_price=category.shop_by_price category_url=category.url}}
{{/if}}
</nav>
</aside>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified this is only used by the file im changing - also not sure why the diff is showing like this all i did was move the aside tag in here

12 changes: 8 additions & 4 deletions templates/pages/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ <h1 class="page-heading">{{category.name}}</h1>
{{{category.description}}}
{{{snippet 'categories'}}}
<div class="page">
{{#or category.subcategories category.faceted_search_enabled category.shop_by_price}}
<aside class="page-sidebar" id="faceted-search-container">
{{#if category.subcategories}}
{{> components/category/sidebar}}
{{else if category.faceted_search_enabled}}
{{> components/category/sidebar}}
{{else if category.shop_by_price}}
{{#if theme_settings.shop_by_price_visibility}}
{{> components/category/sidebar}}
</aside>
{{/or}}
{{/if}}
{{/if}}
<main class="page-content" id="product-listing-container">
{{#if category.products}}
{{> components/category/product-listing}}
Expand Down