SlideShare a Scribd company logo
1 of 24
Magento 2 Theme
Training for Beginners
Author: Pham Van Thao
Date: 07/11/15
Content
1. The new included technologies
2. LESS Language
3. Magento UI Library
4. RequireJS
5. XML
6. Create new a theme in Magento 2
1. The New Included Technologies
2. LESS Language
lLess (sometimes stylized as LESS) is a dynamic style
sheet language that can be compiled into Cascading Style
Sheets (CSS) and run on the client-side or server-side.
lDesigned by Alexis Sellier
lStable release: 2.5.3 - September 25, 2015
lImplementation language: Javascript
2. LESS Language
2. LESS Language
2. LESS Language
Extend class names should have prefix
.abs- (from abstract)
3. Magento UI Library
lThe Magento UI library is a flexible modular Magento
frontend library that is designed to assist Magento theme
developers.
l The Magento UI library offers the following
characteristics for those who develop or customize
Magento themes. It is:
l Built on LESS preprocessor
l Focused on web standards
l Customizable
l Easy to maintain
l Responsive
l Accessible
3. Magento UI Library
lMagento UI library is located under /lib/web/ folder. It
and employs:
lcss/ folder where the library files are placed
lfonts/ folder where default and icon fonts are placed
limages/ folder where default images are placed
ljquery/ folder where jQuery and jQuery widgets are placed
4. RequireJS
lRequireJS is a JavaScript file and module loader.
lIt is optimized for in-browser use, but it can be used in
other JavaScript environments, like Rhino and Node.
4. RequireJS
l Developed By RequireJS.org
l RequireJS Version In Magento2 : 2.1.11
l RequireJS Current Version : 2.1.20
4. RequireJS
lBenifits
l It’s as few HTTP requests are required.
l The code order doesn’t matter
l Asynchronous JavaScript loading
l The file is easy to understand
l RequireJS can tie them together at compile time
l RequireJS only loads the JS script that the page needs.
4. RequireJS
lFeatures:
lSupports all desktop browsers.
lOptimized for nested dependencies.
lAMD implementation
lOffers all necessary documentation and is easy to use.
lDoes not require a server for getting started
lOffers a RequireJS optimizer designed to minify built files
improving the performance of your projects.
lAll its problems are fixed rapidly.
4. RequireJS
lIn Magento2, There are two mandatory JS.
1. require.js
2. requirejs-config.js
l Path & Script to include require.js
appcodeMagentoThemeviewfrontendlayoutdefaul
t_head_blocks.xml
l<script src=”requirejs/require.js”/>
l requirejs-config.js is used for mapping js, defining
dependencies, defining paths etc.
4. RequireJS
lIn Magento2, There are two mandatory JS.
1. require.js
2. requirejs-config.js
l Path & Script to include require.js
appcodeMagentoThemeviewfrontendlayoutdefaul
t_head_blocks.xml
l<script src=”requirejs/require.js”/>
l requirejs-config.js is used for mapping js, defining
dependencies, defining paths etc.
4. RequireJS
lSeveral levels
l At the library level (lib/web)
l At the module level
(app/code/{Namespace}/{Module}/view/{area}/
web)
l At the theme module level
(app/design/{area}/{Vendor}/{theme}/{Namespa
ce}_{Module}/web)
l At the theme level for all
libraries(app/design/{area}/{Vendor}/{theme}/w
eb).
4. RequireJS
lExample
l Custom Module : Newspace_Hello
l Custom Js :
app/code/Newspace/Hello/view/frontend/web/js/myjs.j
s
l Put below code into your template file
lrequire (['Newspace_Hello/js/myjs'],
lfunction(myjs) {
lmyjs.output ('V Good');
l});
5. XML
lExtensible Markup Language (XML) is a markup
language that defines a set of rules for encoding
documents in a format which is both human-readable
and machine-readable.
6. Create new a Theme
Create new a Theme extend from Magento Blank Theme
1.Create new directory have path:
<magento_dir>/app/design/frontend/Magenest/blank
2. Declare theme: Create a file theme.xml file in folder Theme.
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/t
heme.xsd">
<title>Magenest Blank</title>
<parent>Magento/blank</parent>
</theme>
6. Create new a Theme
3. Copy three directory: etc, Magento_Theme, web
From
<magento_dir>/app/design/frontend/Magento/blank
To
<magento_dir>/app/design/frontend/Magenest/blank
1.
6. Create new a Theme
Customize template module:
- Example:
Original template file in path:
<magento_dir>/app/code/Magento/Catalog/view/frontend/t
emplates/product/view/review.php
Create new template file with path:
<magento_dir>/app/design/frontend/Magenest/
blank/Magento_Catalog/templates/product/view/
review.php
6. Create new a Theme
Generate .CSS, .JS file using command line below:
1. cd <magento_dir>
2. bin/magento setup:static-content:deploy
Reference Document
1.http://requirejs.org
2.http://lesscss.org/
3.https://en.wikipedia.org/
4.https://firebearstudio.com/blog/advanced-development-with-requirejs-
magento-2-tutorial.html
5.https://rohitguptadotco.wordpress.com/2015/09/24/requirejs-in-magento2-
basics/
6.https://community.magento.com/t5/Programming-Questions/Overriding-a-
block-in-Magento-2/td-p/6831
7.http://blog.magestore.com/how-to-create-theme-in-magento-2-part-1/
8.http://blog.magestore.com/how-to-create-theme-in-magento-2-part-2/
Magento 2 Theme Trainning for Beginners | Magenest

More Related Content

What's hot

How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)Magestore
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2Mathew Beane
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Mathew Beane
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersJoshua Warren
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionMeet Magento Italy
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in MagentoEric Landmann
 
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Joshua Warren
 
Max Yekaterynenko: Magento 2 overview
Max Yekaterynenko: Magento 2 overviewMax Yekaterynenko: Magento 2 overview
Max Yekaterynenko: Magento 2 overviewMeet Magento Italy
 
Imagine recap-devhub
Imagine recap-devhubImagine recap-devhub
Imagine recap-devhubMagento Dev
 
Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015David Alger
 
The journey of mastering Magento 2 for Magento 1 developers
The journey of mastering Magento 2 for Magento 1 developersThe journey of mastering Magento 2 for Magento 1 developers
The journey of mastering Magento 2 for Magento 1 developersGabriel Guarino
 
How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.Web Visitors
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introductioncherukumilli2
 
Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Max Pronko
 
Packaging DNN extensions
Packaging DNN extensionsPackaging DNN extensions
Packaging DNN extensionsEngage Software
 
Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Peter Martin
 
Magento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second CountsMagento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second CountsJoshua Warren
 

What's hot (20)

How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
12 Amazing Features of Magento 2
12 Amazing Features of Magento 212 Amazing Features of Magento 2
12 Amazing Features of Magento 2
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP Developers
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions Distribution
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in Magento
 
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
 
Introduction to Magento
Introduction to MagentoIntroduction to Magento
Introduction to Magento
 
Max Yekaterynenko: Magento 2 overview
Max Yekaterynenko: Magento 2 overviewMax Yekaterynenko: Magento 2 overview
Max Yekaterynenko: Magento 2 overview
 
Imagine recap-devhub
Imagine recap-devhubImagine recap-devhub
Imagine recap-devhub
 
Magento2 what's new in theming
Magento2 what's new in themingMagento2 what's new in theming
Magento2 what's new in theming
 
Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015
 
The journey of mastering Magento 2 for Magento 1 developers
The journey of mastering Magento 2 for Magento 1 developersThe journey of mastering Magento 2 for Magento 1 developers
The journey of mastering Magento 2 for Magento 1 developers
 
How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2
 
Packaging DNN extensions
Packaging DNN extensionsPackaging DNN extensions
Packaging DNN extensions
 
Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014
 
Magento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second CountsMagento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second Counts
 

Viewers also liked

Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKKey Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKMax Pronko
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceIvan Chepurnyi
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentIvan Chepurnyi
 
Magento 2 Changes Overview
Magento 2 Changes OverviewMagento 2 Changes Overview
Magento 2 Changes OverviewSergii Shymko
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2Sergii Shymko
 
Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Schogini Systems Pvt Ltd
 
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerceMethods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommercedmitriysoroka
 
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Joshua Warren
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With ContainersHanoi MagentoMeetup
 
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website OptimizationHanoi MagentoMeetup
 
Sito ecommerce vs marketplace
Sito ecommerce vs marketplaceSito ecommerce vs marketplace
Sito ecommerce vs marketplaceMageSpecialist
 
Vitalyi Golomoziy - Integration tests in Magento 2
Vitalyi Golomoziy - Integration tests in Magento 2Vitalyi Golomoziy - Integration tests in Magento 2
Vitalyi Golomoziy - Integration tests in Magento 2Meet Magento Italy
 
Magento 2 and avoiding the rabbit hole
Magento 2 and avoiding the rabbit holeMagento 2 and avoiding the rabbit hole
Magento 2 and avoiding the rabbit holeTony Brown
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magentoMathew Beane
 
Andrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategiesAndrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategiesMeet Magento Italy
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Max Pronko
 
Oleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performanceOleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performanceMeet Magento Italy
 
A Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentA Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentJoshua Warren
 
Super-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costsSuper-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costsMikhail Zakharenko
 
Magento 2 product import export
Magento 2 product import exportMagento 2 product import export
Magento 2 product import exportBenno Lippert
 

Viewers also liked (20)

Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKKey Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
 
Magento 2 Changes Overview
Magento 2 Changes OverviewMagento 2 Changes Overview
Magento 2 Changes Overview
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2
 
Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2
 
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerceMethods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
 
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
 
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
 
Sito ecommerce vs marketplace
Sito ecommerce vs marketplaceSito ecommerce vs marketplace
Sito ecommerce vs marketplace
 
Vitalyi Golomoziy - Integration tests in Magento 2
Vitalyi Golomoziy - Integration tests in Magento 2Vitalyi Golomoziy - Integration tests in Magento 2
Vitalyi Golomoziy - Integration tests in Magento 2
 
Magento 2 and avoiding the rabbit hole
Magento 2 and avoiding the rabbit holeMagento 2 and avoiding the rabbit hole
Magento 2 and avoiding the rabbit hole
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magento
 
Andrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategiesAndrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategies
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2
 
Oleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performanceOleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performance
 
A Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentA Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to Deployment
 
Super-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costsSuper-scaling Magento with Docker, micro-services and micro-costs
Super-scaling Magento with Docker, micro-services and micro-costs
 
Magento 2 product import export
Magento 2 product import exportMagento 2 product import export
Magento 2 product import export
 

Similar to Magento 2 Theme Trainning for Beginners | Magenest

Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021WrapPixel
 
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx75waytechnologies
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 202275waytechnologies
 
Latest Web development technologies 2021
 Latest Web development technologies 2021 Latest Web development technologies 2021
Latest Web development technologies 2021SWATHYSMOHAN
 
Customer FX Technical Reference Sheet
Customer FX Technical Reference SheetCustomer FX Technical Reference Sheet
Customer FX Technical Reference SheetGoodCustomers
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppEdureka!
 
NestJS vs. Express The Ultimate Comparison of Node Frameworks.pdf
NestJS vs. Express The Ultimate Comparison of Node Frameworks.pdfNestJS vs. Express The Ultimate Comparison of Node Frameworks.pdf
NestJS vs. Express The Ultimate Comparison of Node Frameworks.pdfchristiemarie4
 
Nenad Andrakovic - Changing the way frontend developers think and work - Mage...
Nenad Andrakovic - Changing the way frontend developers think and work - Mage...Nenad Andrakovic - Changing the way frontend developers think and work - Mage...
Nenad Andrakovic - Changing the way frontend developers think and work - Mage...Meet Magento Italy
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothBhavsingh Maloth
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHBhavsingh Maloth
 

Similar to Magento 2 Theme Trainning for Beginners | Magenest (20)

Beginners introduction to asp.net
Beginners introduction to asp.netBeginners introduction to asp.net
Beginners introduction to asp.net
 
Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021
 
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
 
Yoav Kutner Dutchento
Yoav Kutner DutchentoYoav Kutner Dutchento
Yoav Kutner Dutchento
 
Reactjs
ReactjsReactjs
Reactjs
 
MERN PPT
MERN PPTMERN PPT
MERN PPT
 
NodeJs Frameworks.pdf
NodeJs Frameworks.pdfNodeJs Frameworks.pdf
NodeJs Frameworks.pdf
 
Nodejs
NodejsNodejs
Nodejs
 
Jquery
JqueryJquery
Jquery
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
 
Web Applications
Web ApplicationsWeb Applications
Web Applications
 
Latest Web development technologies 2021
 Latest Web development technologies 2021 Latest Web development technologies 2021
Latest Web development technologies 2021
 
Customer FX Technical Reference Sheet
Customer FX Technical Reference SheetCustomer FX Technical Reference Sheet
Customer FX Technical Reference Sheet
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
 
NestJS vs. Express The Ultimate Comparison of Node Frameworks.pdf
NestJS vs. Express The Ultimate Comparison of Node Frameworks.pdfNestJS vs. Express The Ultimate Comparison of Node Frameworks.pdf
NestJS vs. Express The Ultimate Comparison of Node Frameworks.pdf
 
Nenad Andrakovic - Changing the way frontend developers think and work - Mage...
Nenad Andrakovic - Changing the way frontend developers think and work - Mage...Nenad Andrakovic - Changing the way frontend developers think and work - Mage...
Nenad Andrakovic - Changing the way frontend developers think and work - Mage...
 
Front end frameworks
Front end frameworksFront end frameworks
Front end frameworks
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Magento 2 Theme Trainning for Beginners | Magenest

  • 1. Magento 2 Theme Training for Beginners Author: Pham Van Thao Date: 07/11/15
  • 2. Content 1. The new included technologies 2. LESS Language 3. Magento UI Library 4. RequireJS 5. XML 6. Create new a theme in Magento 2
  • 3. 1. The New Included Technologies
  • 4. 2. LESS Language lLess (sometimes stylized as LESS) is a dynamic style sheet language that can be compiled into Cascading Style Sheets (CSS) and run on the client-side or server-side. lDesigned by Alexis Sellier lStable release: 2.5.3 - September 25, 2015 lImplementation language: Javascript
  • 7. 2. LESS Language Extend class names should have prefix .abs- (from abstract)
  • 8. 3. Magento UI Library lThe Magento UI library is a flexible modular Magento frontend library that is designed to assist Magento theme developers. l The Magento UI library offers the following characteristics for those who develop or customize Magento themes. It is: l Built on LESS preprocessor l Focused on web standards l Customizable l Easy to maintain l Responsive l Accessible
  • 9. 3. Magento UI Library lMagento UI library is located under /lib/web/ folder. It and employs: lcss/ folder where the library files are placed lfonts/ folder where default and icon fonts are placed limages/ folder where default images are placed ljquery/ folder where jQuery and jQuery widgets are placed
  • 10. 4. RequireJS lRequireJS is a JavaScript file and module loader. lIt is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node.
  • 11. 4. RequireJS l Developed By RequireJS.org l RequireJS Version In Magento2 : 2.1.11 l RequireJS Current Version : 2.1.20
  • 12. 4. RequireJS lBenifits l It’s as few HTTP requests are required. l The code order doesn’t matter l Asynchronous JavaScript loading l The file is easy to understand l RequireJS can tie them together at compile time l RequireJS only loads the JS script that the page needs.
  • 13. 4. RequireJS lFeatures: lSupports all desktop browsers. lOptimized for nested dependencies. lAMD implementation lOffers all necessary documentation and is easy to use. lDoes not require a server for getting started lOffers a RequireJS optimizer designed to minify built files improving the performance of your projects. lAll its problems are fixed rapidly.
  • 14. 4. RequireJS lIn Magento2, There are two mandatory JS. 1. require.js 2. requirejs-config.js l Path & Script to include require.js appcodeMagentoThemeviewfrontendlayoutdefaul t_head_blocks.xml l<script src=”requirejs/require.js”/> l requirejs-config.js is used for mapping js, defining dependencies, defining paths etc.
  • 15. 4. RequireJS lIn Magento2, There are two mandatory JS. 1. require.js 2. requirejs-config.js l Path & Script to include require.js appcodeMagentoThemeviewfrontendlayoutdefaul t_head_blocks.xml l<script src=”requirejs/require.js”/> l requirejs-config.js is used for mapping js, defining dependencies, defining paths etc.
  • 16. 4. RequireJS lSeveral levels l At the library level (lib/web) l At the module level (app/code/{Namespace}/{Module}/view/{area}/ web) l At the theme module level (app/design/{area}/{Vendor}/{theme}/{Namespa ce}_{Module}/web) l At the theme level for all libraries(app/design/{area}/{Vendor}/{theme}/w eb).
  • 17. 4. RequireJS lExample l Custom Module : Newspace_Hello l Custom Js : app/code/Newspace/Hello/view/frontend/web/js/myjs.j s l Put below code into your template file lrequire (['Newspace_Hello/js/myjs'], lfunction(myjs) { lmyjs.output ('V Good'); l});
  • 18. 5. XML lExtensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format which is both human-readable and machine-readable.
  • 19. 6. Create new a Theme Create new a Theme extend from Magento Blank Theme 1.Create new directory have path: <magento_dir>/app/design/frontend/Magenest/blank 2. Declare theme: Create a file theme.xml file in folder Theme. <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/t heme.xsd"> <title>Magenest Blank</title> <parent>Magento/blank</parent> </theme>
  • 20. 6. Create new a Theme 3. Copy three directory: etc, Magento_Theme, web From <magento_dir>/app/design/frontend/Magento/blank To <magento_dir>/app/design/frontend/Magenest/blank 1.
  • 21. 6. Create new a Theme Customize template module: - Example: Original template file in path: <magento_dir>/app/code/Magento/Catalog/view/frontend/t emplates/product/view/review.php Create new template file with path: <magento_dir>/app/design/frontend/Magenest/ blank/Magento_Catalog/templates/product/view/ review.php
  • 22. 6. Create new a Theme Generate .CSS, .JS file using command line below: 1. cd <magento_dir> 2. bin/magento setup:static-content:deploy