Ad
Override Page.html Template From An App
Is it possible to override (or overextend) the page template (pages/page.html) in Mezzanine from an app? It seems like the view mezzanine.pages.views.page will always look for (and find) the template in the Mezzanine app.
I am trying to add a tracking code (Piwik) to all the pages.
Ad
Answer
Yes.
Django uses multiple template loaders, and the one that Mezzanine will use is the "app" loader.
The only thing you need to do is to make sure that another template loader can find the "page.html" template before the "app" one.
The template loaders are called in the order defined in your settings (TEMPLATE_LOADERS
).
Ad
source: stackoverflow.com
Related Questions
- → Django, code inside <script> tag doesn't work in a template
- → Uncaught ReferenceError: Parent is not defined
- → React - Django webpack config with dynamic 'output'
- → Put a Rendered Django Template in Json along with some other items
- → Implement shopify templates in django
- → Python Shopify API output formatted datetime string in django template
- → How to avoid being crawled/penalized by Google
- → Django: Identify the urls that provide duplicate content and set a canonical link
- → Shopify app: adding a new shipping address via webhook
- → Jquery Modal Confirmation on Django form submit for deletion of object
- → changing the size of an image with css
- → shopify_auth multi store session handling
- → How to use Shopify Python API RecurringApplicationCharge
Ad