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

Rework template calls for module #6491

Merged

Conversation

julienbourdeau
Copy link
Contributor

@julienbourdeau julienbourdeau commented Sep 26, 2016

Questions Answers
Branch? develop
Description? $this->smarty in a module class is a very nice feature, you can assign variables and they are not global. Unfortunately $this->display uses hacks to load overrides and cache. This PR introduce $this->fetch which unleash the power of smarty. For a front module the best is described below.
Type? new feature
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket?
How to test?

If your module is loading front template, do:

$this->fetch('module:modulename/path/to/template.tpl');

It will make theme override much more powerful! (read the doc for further information).

Wrapper.tpl

I also removed the wrapper tpl so modulefrontcontroller can call theme templates like catalog/product.tpl for instance.

@maximebiloe maximebiloe merged commit 55212ac into PrestaShop:develop Sep 28, 2016
@maximebiloe maximebiloe deleted the feat/introduce-module-fetch branch September 28, 2016 09:54
@maximebiloe
Copy link
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants