PART 1.1.1 – Theme file structure

  • Magento 2 file structure
  • Magento 2’s Theme File Structure
  • Admin settings
  • Themes: Magento 1 vs. Magento 2
  • theme-module vs. app/design

Magento 2 file structure

/app/code

Contains Magento and third-party program code

/app/design

Contains designs for Magento storefronts

/app/etc

Contains the base configuration for Magento installation

/app/i18n

Contains bare configuration files used for language and wording overrides

/bin

Contains Magento command-line utility

/pub

Contains all static files, such as images, CSS and JavaScript. This directory is published with Magento scripting functionality and should not be modified manually

/pub/media

Contains all uploaded media, such as product images

/pub/static

Contains static theme-specific CSS, JavaScript, fonts, and images

/var

Contains temporary items such as error reports, cache, sessions, and import/export files

index.php

Important routing and access files

.htaccess

Apache configuration file

Removing .htaccess from /pub directory can cause problems with rendering styles. In case, your styles are not generated, make sure, you didn’t remove .htaccess file from /pub directory.

Magento 2’s Theme File Structure

Vendor_Modules (e.g. Magento_Theme)

Contains dynamic and static theme components overriding core theme files

etc

Contains theme-specific data configuration

i18n

Contains CSV files used for language and wording overrides

media

Contains the screenshot provided for the theme list in the Admin panel

web

Contains static theme-specific CSS, JavaScript, fonts, and images

composer.json

Describes theme dependencies and some metainformation

theme.xml

Contains basic meta-information, such as the theme name and the parent theme name

registration.php

Declares a theme as a system component

Admin settings

Themes: Magento 1 vs. Magento 2

 

theme-module vs. app/design

There are 2 ways with working with Magento 2’s theme. The theme on separate repository and the theme on project repository. 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s