Skip to content

Commit

Permalink
Merge pull request #1830 from cbatista8a/patch-1
Browse files Browse the repository at this point in the history
[doc] - improve 'How to override Back Office views' guide in admin-views.md
  • Loading branch information
kpodemski authored Jun 24, 2024
2 parents ef3f9fd + bd02370 commit 8467f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/concepts/templating/admin-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ First we need to identify which Twig template(s) is (are) rendered. Using the *D
### Override the template in the module: a simple "Hello world!"

Now we have found the right template, let's override it inside a module.
In a module called `foo` let's create the related template. As the template is located inside the `PrestaShop/Admin/Product/CatalogPage` folder, we need to create the same path.
In a module called `foo` let's create the related template. Since the original template is located inside the `src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage` folder, we need to create the same path into our module, but with a small difference: This part `src/PrestaShopBundle/Resources/views` is replaced by the `PrestaShop` namespace and the final path is `modules/foo/views/PrestaShop/Admin/Product/CatalogPage`.

So Let's create a file named `catalog.html.twig` in the `modules/foo/views/PrestaShop/Admin/Product/CatalogPage/catalog.html.twig` folder: we could re-use the one in the `src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage` folder, but let's start with a very simple override.

Expand Down

0 comments on commit 8467f50

Please sign in to comment.