diff --git a/docs/customization.md b/docs/customization.md index 8007ab2d4..2a0a77a16 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -266,19 +266,121 @@ You should at least override `home.title`, `home.description` and `home.welcome- ## HTML / Scripts -You can include some HTML parts in different sections of the layout application, with files: +### HTML templates : + +You can include some HTML parts in different sections of the layout application. +These templates can be translated by using the language code as a suffix (e.g. `homeTop-en.html` will be rendered only for the English interface). The application tries to find the localized template first, otherwise it tries the non-localized template, otherwise it displays nothing. +NB: If you want to display a message common to all languages but not to a particular language (e.g. french), just create the template suffixed with its language code (e.g. `-fr.html`) and leave it empty, and voilĂ ! + +See examples in https://github.com/GeotrekCE/Geotrek-rando-v3/tree/main/frontend/customization/html. + +#### Templates available on all pages - `customization/html/headerTop.html`: before the header section - `customization/html/headerBottom.html`: after the header section and before the content page - `customization/html/footerTop.html`: before the footer section and after the content page - `customization/html/footerBottom.html`: after the footer section + +#### Templates available on home page + - `customization/html/homeTop.html`: first section of the homepage - `customization/html/homeBottom.html`: last section of the homepage -These templates can be translated by using the language code as a suffix (e.g. `homeTop-en.html` will be rendered only for the English interface). The application tries to find the localized template first, otherwise it tries the non-localized template, otherwise it displays nothing. -NB: If you want to display a message common to all languages but not to a particular language (e.g. french), just create the template suffixed with its language code (e.g. `-fr.html`) and leave it empty, and voilĂ ! +#### Templates on details page (trek, touristic content, touristic event, outdoor site and outdoor course) + +You can create your own templates to display practical information or widgets in different parts of the details page. There are 3 steps to follow: + +1. Create a new file suffixed with `.html` in `customization/html/details/` (e.g. `example.html`) and fill the the content with html tags + + ```html +