Une première version d'une version permettant d'avoir des templates différents suivant la langue.
A creuser mais peut-être pas besoin de TemplateSwitcher et de CustomSwitchTemplate, et qu'il suffirait de rajouter juste du Smarty dans layout.tpl et index.html
This commit is contained in:
13
local/modules/CustomSwitchTemplate/Config/config.xml
Normal file
13
local/modules/CustomSwitchTemplate/Config/config.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<services>
|
||||
<service id="customswitchtemplate.listener" class="CustomSwitchTemplate\EventListeners\CustomSwitchTemplateListener">
|
||||
<argument type="service" id="request_stack"/>
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
</services>
|
||||
</config>
|
||||
37
local/modules/CustomSwitchTemplate/Config/module.xml
Normal file
37
local/modules/CustomSwitchTemplate/Config/module.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module xmlns="http://thelia.net/schema/dic/module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
|
||||
<fullnamespace>CustomSwitchTemplate\CustomSwitchTemplate</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Change template according to user's language, to hide some features (placing order, ...) to non-french users</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Change le template suivant la langue, pour proposer une version "bridée" du site aux clients non français</title>
|
||||
</descriptive>
|
||||
<languages>
|
||||
<language>en_US</language>
|
||||
<language>fr_FR</language>
|
||||
</languages>
|
||||
<version>1.0.0</version>
|
||||
<authors>
|
||||
<author>
|
||||
<name>Laurent LE CORRE</name>
|
||||
<company>TheCoreDev</company>
|
||||
<email>laurent@thecoredev.fr</email>
|
||||
</author>
|
||||
</authors>
|
||||
<type>classic</type>
|
||||
<!--
|
||||
module dependencies
|
||||
<required>
|
||||
<module version=">=0.1">Front</module>
|
||||
<module version="~1.0">HookCart</module>
|
||||
<module version=">0.2">HookSearch</module>
|
||||
</required>
|
||||
-->
|
||||
<thelia>2.3.0</thelia>
|
||||
<stability>other</stability>
|
||||
<mandatory>0</mandatory>
|
||||
<hidden>0</hidden>
|
||||
</module>
|
||||
9
local/modules/CustomSwitchTemplate/Config/thelia.sql
Normal file
9
local/modules/CustomSwitchTemplate/Config/thelia.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
INSERT INTO config (name, value, secured, hidden, created_at, updated_at)
|
||||
VALUES('alternative-front-template', 'sterivein_sans_commande', 0, 0, '2024-01-09 12:00:00.000', NULL);
|
||||
|
||||
INSERT INTO config_i18n
|
||||
(id, locale, title, description, chapo, postscriptum)
|
||||
VALUES(LAST_INSERT_ID(), 'fr_FR', 'Module CustomSwitchTemplate - Nom du template sans commande', NULL, NULL, NULL);
|
||||
INSERT INTO config_i18n
|
||||
(id, locale, title, description, chapo, postscriptum)
|
||||
VALUES(LAST_INSERT_ID(), 'en_US', 'Module CustomSwitchTemplate - Name of alternative template', NULL, NULL, NULL);
|
||||
Reference in New Issue
Block a user