Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

Hook displayOverrideTemplate

Informations

Change the default template of current controller
Hook displayOverrideTemplate
Locations
FO
Type display
Origin core
Aliases

Located in

Origin File
core classes/controller/FrontController.php

Call of the Hook in the origin file

Before 8.1

Hook::exec(
  'displayOverrideTemplate',
  [
    'controller' => $this,
    'template_file' => $template,
    'id' => $params['id'],
    'locale' => $locale,
  ]
)

From 8.1

Hook::exec(
  'displayOverrideTemplate',
  [
    'controller' => $this,
    'template_file' => $template,
    'entity' => $params['entity'],
    'id' => $params['id'],
    'locale' => $locale,
  ]
)