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 template country global vars #29707
Add template country global vars #29707
Conversation
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.
$this->objectPresenter->present($this->context->country)
Co-authored-by: Jonathan Danse <j.danse@prestaedit.com>
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.
Makes sense for me 👍
Do you have a specific usecase in mind?
It's good to have everything ready in a template. ;-) |
They say "don't be afraid of asking questions" so ... I might have missed the joke 😅 but what do you mean? |
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.
Hello @PululuK ,
I think I'm testing it wrong. Could you confirm a way to test it?
Here's what I'm doing, in develop/themes/classic/templates/cms/stores.tpl
I added {$country}
but the result is not as expected:
Tested with other global vars, same thing. In fact, I know I'm not testing it right 😅
Waiting for your answer :)
Thanks!
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.
Hello again,
Tested again with @Hlavtox 's tips! 😉
I can access the variable easily just by {dump($country)}
or adding {$country.name}
.
Info was added in MY_SHOP/themes/classic/templates/cms/stores.tpl
Works like a charm.
It is QA ✅ !
Thank you @PululuK and @florine2623 |
smarty var_dump($country)