-
Notifications
You must be signed in to change notification settings - Fork 614
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
Add Dynamic Content Regions to Cornerstone - MERC-2436 #1023
Add Dynamic Content Regions to Cornerstone - MERC-2436 #1023
Conversation
{{else}} | ||
<div class="header-logo header-logo--{{theme_settings.logo-position}}"> | ||
{{> components/common/store-logo}} | ||
</div> | ||
{{/if}} | ||
|
||
{{#if template_file '===' 'pages/cart'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this. Instead use the partial
helper.
In pages/cart.html
add
{{#partial "header"}}
{{{region name="cart-page-banner"}}}
{{/partial}}
6e49060
to
418dc38
Compare
@@ -16,13 +16,14 @@ | |||
<h1 class="header-logo header-logo--{{theme_settings.logo-position}}"> | |||
{{> components/common/store-logo}} | |||
</h1> | |||
|
|||
{{{region name="homepage-banner"}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets call this homepage_banner
for consistency with the other names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were going to use header_bottom for this.
https://docs.google.com/spreadsheets/d/1P4ncQzCrCeJJp8sXgFuAxWKuDqhvFeHmkuJ3b5MytmI/edit#gid=0
Can't you just move it out of the conditional block to include this region on every page?
418dc38
to
c5a6eee
Compare
@@ -16,13 +16,14 @@ | |||
<h1 class="header-logo header-logo--{{theme_settings.logo-position}}"> | |||
{{> components/common/store-logo}} | |||
</h1> | |||
|
|||
{{{region name="homepage_banner"}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were going to use header_bottom for this.
https://docs.google.com/spreadsheets/d/1P4ncQzCrCeJJp8sXgFuAxWKuDqhvFeHmkuJ3b5MytmI/edit#gid=0
Can't you just move it out of the conditional block to include this region on every page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points. 👍 Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
c5a6eee
to
384ad60
Compare
@junedkazi @mjschock - Please take a look at this PR let me know if we're missing anything required for merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@tabayomi - i forgot to mention - can you please add a changelog entry |
@@ -21,8 +20,7 @@ <h1 class="header-logo header-logo--{{theme_settings.logo-position}}"> | |||
{{> components/common/store-logo}} | |||
</div> | |||
{{/if}} | |||
|
|||
|
|||
{{{region name="header_bottom"}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick question - how will we differentiate the cart page from the home page when targeting this single region?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By placement parameters. Placements require specifying a template file. We target a page with content based on both the region name AND the template file.
So in the case of the home page it would target "pages/home". For the cart page - "pages/cart".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 sweet, thanks
731978c
to
2527ee0
Compare
2527ee0
to
2328e7a
Compare
Hello Guys, Can anyone please let me know what exactly the use of this "Regions" tag on header and products page? |
@minankmori see #1193 for more details |
What?
Cornerstone with Region tags added to default locations.
Tickets / Documentation
Add links to any relevant tickets and documentation.
Merge Checklist