[Skip to main content](#vessel-content)

#   Surcharge dans "child template"

##

- **[kilou](/forum/user/32861-kilou "View kilou's Profile")**
- [![kilou's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32861.png)](/forum/user/32861-kilou "View kilou's Profile") Topic Author
- [ Offline](/forum/user/32861-kilou)

Less More

- Posts: 732
- Thank you received: 39
-

2 years 10 months ago [\#358556](#358556) by [kilou](/forum/user/32861-kilou "View kilou's Profile")  *[Surcharge dans "child template"](/forum/5-support-en-francais-french-support-/907657-surcharge-dans-child-template#358556 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.0  Bonjour, j’utilise un “child template” qui se trouve dans: /media/templates/site/astroid&#95;template&#95;one  Concernant les surcharges d’Hikashop qui se trouvent dans: /templates/astroid&#95;template&#95;one/html/com&#95;hikashop peuvent-elles aussi être déplacées dans le “child template”? Si oui, faut-il recréer un dossier html?  Merci, Lorenzo")* was created by *[kilou](/forum/user/32861-kilou "View kilou's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 4.4.2
-- PHP version -- : 8.2.0

Bonjour,
j’utilise un “child template” qui se trouve dans:
**/media/templates/site/astroid\_template\_one**

Concernant les surcharges d’Hikashop qui se trouvent dans:
**/templates/astroid\_template\_one/html/com\_hikashop**
peuvent-elles aussi être déplacées dans le “child template”? Si oui, faut-il recréer un dossier html?

Merci,
Lorenzo

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA3NjU3LXN1cmNoYXJnZS1kYW5zLWNoaWxkLXRlbXBsYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

2 years 10 months ago [\#358557](#358557) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Surcharge dans "child template"](/forum/5-support-en-francais-french-support-/907657-surcharge-dans-child-template#358557 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.0  Bonjour, j’utilise un “child template” qui se trouve dans: /media/templates/site/astroid&#95;template&#95;one  Concernant les surcharges d’Hikashop qui se trouvent dans: /templates/astroid&#95;template&#95;one/html/com&#95;hikashop peuvent-elles aussi être déplacées dans le “child template”? Si oui, faut-il recréer un dossier html?  Merci, Lorenzo")*

Bonjour,

Je n'ai personnellement jamais utilisé cette fonction.
Donc je ne suis pas très familier avec cela.
J'ai donc fait quelques recherches.
D'après [ magazine.joomla.org/all-issues/may-2022/...omla-child-templates](https://magazine.joomla.org/all-issues/may-2022/a-deep-dive-into-joomla-child-templates)

> An override is a file you can create and store in the HTML folder of your template which allows you to provide your own layout for a component or module.
>
> So far so good, but often a template will ship with overrides of core Joomla components within the template so that the template can make a different layout to the standard Joomla template. If you then want to change the way the template override looks you would need to edit the template files directly, that's not a good idea. With an update, your work could be overwritten.
>
> This is the beauty of child templates: whether there are custom overrides in your template or you want to add your own spin on the layout of a component you can use child templates and be confident that you are in charge when the component and the template are updated.

Donc d'après cela, c'est en effet possible d'avoir des overrides d'override dans les child templates.
Par contre, c'est la seule partie de l'article qui n'explique pas les détails techniques de comment procéder.
J'ai parcouru la vidéo associée à la fin de l'article ( [ www.youtube.com/watch?v=8lX44gS9QG8](https://www.youtube.com/watch?v=8lX44gS9QG8) ) et apparemment, il est en effet possible de mettre les overrides dans un dossier html du child template.

Notez cependant que ce que vous voulez faire n'est pas forcément utile.
L'intérêt d'avoir vos overrides dans le child template, c'est uniquement si votre template contient de base ces overrides et que vous voulez modifier ces overrides à votre sauce. Ainsi, vos modifications ne seront pas perdues lorsque vous mettrez à jour le template. Mais si ce sont des overrides que vous avez créés vous-même, alors les mises à jour de votre template n'affecterons pas vos overrides (à moins que le développeur du template décide de rajouter ses propres overrides de ces même vues dans une version future du template, ce qui normalement ne devrait jamais arrivé).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA3NjU3LXN1cmNoYXJnZS1kYW5zLWNoaWxkLXRlbXBsYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kilou](/forum/user/32861-kilou "View kilou's Profile")**
- [![kilou's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar32861.png)](/forum/user/32861-kilou "View kilou's Profile") Topic Author
- [ Offline](/forum/user/32861-kilou)

Less More

- Posts: 732
- Thank you received: 39
-

2 years 10 months ago [\#358572](#358572) by [kilou](/forum/user/32861-kilou "View kilou's Profile")  Replied by *[kilou](/forum/user/32861-kilou "View kilou's Profile")* on topic *[Surcharge dans "child template"](/forum/5-support-en-francais-french-support-/907657-surcharge-dans-child-template#358572 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.0  Bonjour, j’utilise un “child template” qui se trouve dans: /media/templates/site/astroid&#95;template&#95;one  Concernant les surcharges d’Hikashop qui se trouvent dans: /templates/astroid&#95;template&#95;one/html/com&#95;hikashop peuvent-elles aussi être déplacées dans le “child template”? Si oui, faut-il recréer un dossier html?  Merci, Lorenzo")*

c’est exactement ce qui se passe avec le template par défaut du framework Astroid, le développeur a placé lui même des overrides dans le dossier html (par exemple le fichier /templates/astroid_template_one/html/com_users/login/default.php a été modifié par le développeur et par la suite moi-même je l’ai modifié).

Je viens d’avoir une réponse du développeur qui indique que si les overrides on été modifiés, il suffit de créer un dossier html dans le child template, ainsi les modifications resteront en place à la prochaine mise à jour du template.
Tout cela pour dire que je voulais déplacer tout le dossier html dans le child template (donc aussi les overrides d’Hikashop) mais je pense que je vais juste déplacer les overrides que j’ai modifié et qui font référence au template.

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA3NjU3LXN1cmNoYXJnZS1kYW5zLWNoaWxkLXRlbXBsYXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.055 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
