Skip to content

Commit

Permalink
Add a switch to show sections among products
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshadura committed Nov 6, 2022
1 parent 3a72268 commit bbedf83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ copyright = "| Copyright © 2019 [Gethugothemes](https://gethugothemes.com)
# Snipcart Credentials
snipcartApiKey = "M2E5YjA3NjMtYzRiYS00YzVjLWEyYWYtNDY5ZDI0OWZhYjg5"
currencySymbol = "$"
# whether to show product sections among products
showProductSections = true

# Preloader
[params.preloader]
Expand Down
2 changes: 1 addition & 1 deletion layouts/products/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="container">
<div class="row">
{{ range .Data.Pages }}
{{ if not .IsSection }}
{{ if site.Params.showProductSections | or (not .IsSection) }}
{{ $image := "" }}
{{ if .Params.Image }}
{{ $image = .Params.Image | absURL }}
Expand Down

0 comments on commit bbedf83

Please sign in to comment.