File tree Expand file tree Collapse file tree 5 files changed +44
-0
lines changed Expand file tree Collapse file tree 5 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1010- Added: Generator command for sample page_types.xml file
1111- Added: Generator command for sample crontab.xml file
1212- Added: Generator command for sample email_templates.xml file
13+ - Added: Generator command for sample sections.xml file
1314
1415## [ 1.1.3] - 3/12/2025
1516
Original file line number Diff line number Diff line change 126126 {
127127 "command" : " magento-toolbox.generateEmailTemplatesXmlFile" ,
128128 "title" : " Magento Toolbox: Generate Email Templates XML"
129+ },
130+ {
131+ "command" : " magento-toolbox.generateSectionsXmlFile" ,
132+ "title" : " Magento Toolbox: Generate Sections XML"
129133 }
130134 ],
131135 "menus" : {
215219 {
216220 "command" : " magento-toolbox.generateEmailTemplatesXmlFile" ,
217221 "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
222+ },
223+ {
224+ "command" : " magento-toolbox.generateSectionsXmlFile" ,
225+ "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
218226 }
219227 ]
220228 }
Original file line number Diff line number Diff line change 1+ import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand' ;
2+ import { TemplateWizardData } from 'wizard/SimpleTemplateWizard' ;
3+ import FileHeader from 'common/xml/FileHeader' ;
4+
5+ export default class GenerateSectionsXmlCommand extends SimpleTemplateGeneratorCommand {
6+ constructor ( ) {
7+ super ( 'magento-toolbox.generateSectionsXmlFile' ) ;
8+ }
9+
10+ getWizardTitle ( ) : string {
11+ return 'Sections XML File' ;
12+ }
13+
14+ getFileHeader ( data : TemplateWizardData ) : string | undefined {
15+ return FileHeader . getHeader ( data . module ) ;
16+ }
17+
18+ getFilePath ( data : TemplateWizardData ) : string {
19+ const [ vendor , module ] = data . module . split ( '_' ) ;
20+
21+ return `app/code/${ vendor } /${ module } /etc/frontend/sections.xml` ;
22+ }
23+
24+ getTemplateName ( data : TemplateWizardData ) : string {
25+ return 'xml/blank-sections' ;
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ export { default as GenerateWebapiXmlFileCommand } from './GenerateWebapiXmlFile
1616export { default as GeneratePageTypesXmlCommand } from './GeneratePageTypesXmlCommand' ;
1717export { default as GenerateCrontabXmlCommand } from './GenerateCrontabXmlCommand' ;
1818export { default as GenerateEmailTemplatesXmlCommand } from './GenerateEmailTemplatesXmlCommand' ;
19+ export { default as GenerateSectionsXmlCommand } from './GenerateSectionsXmlCommand' ;
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <% if (fileHeader) { -% >
3+ < %- fileHeader % >
4+ < % } - %>
5+ <config xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance"
6+ xsi:noNamespaceSchemaLocation =" urn:magento:module:Magento_Customer:etc/sections.xsd" >
7+ </config >
You can’t perform that action at this time.
0 commit comments