04.07.2019 Views

frontend-developer-1

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Create Themes<br />

Magento uses the Composer autoloader. If you look at the Luma theme’s composer.<br />

json, you will see the autoload.files node, whose value is registration.php.<br />

As the Magento application starts up, Composer executes each file as specified<br />

in the autoload.files section. registration.php then registers itself as a<br />

theme. The theme is now available.<br />

1.2 DESCRIBE THE DIFFERENT FOLDERS OF A<br />

THEME<br />

etc/: this folder usually has one file: view.xml. view.xml provides configuration<br />

values for the theme in a structured format.<br />

i18n/: this folder contains translations for the theme.<br />

media/: this folder usually has one file: preview.jpg. The preview image<br />

provides a sample of what the theme will look like when activated.<br />

web/: the files and directories here will be eventually downloaded by website<br />

visitors. In one form or another, they will ultimately be accessible from pub/<br />

static. LESS files will first be placed in var/view_preprocessed before being<br />

compiled and found in pub/static.<br />

As a rule of thumb, Magento recommends not to use this directory but rather place<br />

customizations of the theme into the appropriate directory within the module<br />

directory where the functionality originates (for example, checkout customizations<br />

should be placed under the Magento_Checkout/web directory).<br />

css/: location of base Magento stylesheets. These will be exported to the pub/<br />

static/[area]/[package]/[theme]/[locale]/css directory.<br />

Copyright © 2018, SwiftOtter, Inc.<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!