Skip to content

Commit bd02370

Browse files
authored
[doc] - improve admin-views.md
The "How to override Back Office views" guide was not very clear regarding the height of directories that need to be created within a module for the changes to take effect.
1 parent ef3f9fd commit bd02370

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/concepts/templating/admin-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ First we need to identify which Twig template(s) is (are) rendered. Using the *D
2626
### Override the template in the module: a simple "Hello world!"
2727

2828
Now we have found the right template, let's override it inside a module.
29-
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.
29+
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`.
3030

3131
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.
3232

0 commit comments

Comments
 (0)