SlideShare uma empresa Scribd logo
1 de 24
Magento2
What’s New in Theming
Waruna Perera
Senior Front End Software Engineer
Agenda
 New folder structure
 Less instead of Sass
 Layouts
 UI Components / JS
 Creating a New Theme
Magento1 theme folders
New Folder Structure
 No skin folder
 New Pub Folder
 All static files are published in Pub folder
 Front End themes are located under app/design/frontend/<Vendor>/
 Magento default themes can be found under
vendor/magento/theme-frontend-<theme_code>
Magento2 theme folders
Pub/static
Theme Inheritance
 Static view files - css/js/fonts/images
 Dynamic view files – less/templates/layouts
Theme Files
 Guarantees that if a view file is not found in the current theme, the system
searches in the ancestor themes, module view files or library.
 Parent theme is defined in the child theme theme.xml file
 Static files can be overridden by adding a file with the same name on relevant
location
 .less (even though they are not static files) files are also overridden by a file
with same name
Magento/test/theme.xml
Magento/test/etc/view.xml
Extending Layouts
 Unlike templates or images, layout can not be overridden, but only extended
 Layouts are called in order of:
I. Current them layouts
II. Ancestor theme layouts
III. Module layout for frontend area
IV. Module layout for base area
Include css files
 /Magento_Theme/layout/default_head_blocks.xml
 If the system does not find the included CSS files, it searches for the same file
names with a .less extension.
CSS files locations
 Css files are located at :
/module_name/web/css/
/web/css/
/Magento_Theme/layout/default_head_blocks.xml
 Css/js with module files
Css pre-processor
 Sass on magento1.9. Less on magento 2
 Less files are stored in web/css/source folder
Why Less? Not Sass?
 Sass is widely used than less
 Sass needs ruby to compilation
 Less can be compiled with less resources- grunt, less.js
Less compile methods
1. Server-side LESS compilation.
 default compilation mode
 compilation is performed on the server, using the LESS PHP library
2. Client-side LESS compilation.
 compilation is performed on the browser using less.js library
 Used on development mode
Less compile methods
Stores > Configuration > ADVANCED > Developer.
Less compile with grunt
 In server-side compilation mode, you can use the Grunt JavaScript task
runner.
 Need node.js installed
 Install Grunt CLI
 Install Grunt in your Magento directory
 Install (or refresh) the node.js project dependency for your Magento instance
 Add your theme to Grunt configuration - dev/tools/grunt/configs/themes.js
Magento UI library
 Flexible LESS-based frontend library designed to assist Magento theme developers.
 It employs a set of mixins for base elements to ease frontend theme development
and customization.
 Located at lib/web/css
 Action-toolbar, breadcrumbs, buttons, drop-downs, forms, icons, layout,
loaders, messages, pagination, popups
Inbuilt components
Magento UI library
Less Mixins
 You can use a mixin with default variables values, or you can redefine them
when calling a mixin.
 Variables starting with _@ are private variables within a mixin.
Require js
 Including javascript on header can slow down page loading speed
 Magento2 uses Require js library to overcome this problem
 RequireJS improves the perceived page load time because it allows JavaScript
to load in the background
 It enables asynchronous javaScript loading.
 RequireJS improves the speed and quality of your code by breaking large
application into smaller manageable code
 RequireJS loads plain JavaScript files as well as more defined modules
 RequireJS only loads the JS script that the page needs.
• require.js - appcodeMagentoThemeviewfrontendlayoutdefault_head_blocks.xml
• requirejs-config.js - app/code/{Namespace}/{Module}/view/{area}/requirejs-config.js
Env.php
Creating a new theme
Thank you!!

Mais conteúdo relacionado

Mais procurados

Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarksMagento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarksYireo
 
What’s new in joomla 3.7
What’s new in joomla 3.7What’s new in joomla 3.7
What’s new in joomla 3.7Tim Plummer
 
Meet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssMeet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssAmasty
 
Magento 2: A technical overview
Magento 2: A technical overviewMagento 2: A technical overview
Magento 2: A technical overviewX.commerce
 
Magento 2 Design Patterns
Magento 2 Design PatternsMagento 2 Design Patterns
Magento 2 Design PatternsMax Pronko
 
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
 
XPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarXPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarHoward Greenberg
 
Sergii Shymko - Code migration tool for upgrade to Magento 2
Sergii Shymko - Code migration tool for upgrade to Magento 2Sergii Shymko - Code migration tool for upgrade to Magento 2
Sergii Shymko - Code migration tool for upgrade to Magento 2Meet Magento Italy
 
Meet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey IvashchenkoMeet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey IvashchenkoAmasty
 
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
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauAmasty
 
Meet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen RistićMeet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen RistićAmasty
 
Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015David Alger
 

Mais procurados (19)

Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarksMagento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
 
Introduction to Magento
Introduction to MagentoIntroduction to Magento
Introduction to Magento
 
What’s new in joomla 3.7
What’s new in joomla 3.7What’s new in joomla 3.7
What’s new in joomla 3.7
 
Social website
Social websiteSocial website
Social website
 
Meet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssMeet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis Lukss
 
Magento 2: A technical overview
Magento 2: A technical overviewMagento 2: A technical overview
Magento 2: A technical overview
 
Chromatique
ChromatiqueChromatique
Chromatique
 
Magento 2 Design Patterns
Magento 2 Design PatternsMagento 2 Design Patterns
Magento 2 Design Patterns
 
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
 
XPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarXPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 Webinar
 
Sergii Shymko - Code migration tool for upgrade to Magento 2
Sergii Shymko - Code migration tool for upgrade to Magento 2Sergii Shymko - Code migration tool for upgrade to Magento 2
Sergii Shymko - Code migration tool for upgrade to Magento 2
 
Readme
ReadmeReadme
Readme
 
Meet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey IvashchenkoMeet Magento Belarus - Sergey Ivashchenko
Meet Magento Belarus - Sergey Ivashchenko
 
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
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir Kalashnikau
 
Meet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen RistićMeet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen Ristić
 
Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015
 
Eclipse orion
Eclipse orionEclipse orion
Eclipse orion
 

Destaque

Require js and Magento2
Require js and Magento2Require js and Magento2
Require js and Magento2Irene Iaccio
 
Ben Marks - Magento Inc.
Ben Marks - Magento Inc.Ben Marks - Magento Inc.
Ben Marks - Magento Inc.meet_magento
 
Magento Meetup New Delhi- Magento2 Ui component
Magento Meetup New Delhi- Magento2 Ui componentMagento Meetup New Delhi- Magento2 Ui component
Magento Meetup New Delhi- Magento2 Ui componentWebkul Software Pvt. Ltd.
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationWebkul Software Pvt. Ltd.
 
Magento Meetup New Delhi- Magento2 code generation
Magento Meetup New Delhi- Magento2 code generationMagento Meetup New Delhi- Magento2 code generation
Magento Meetup New Delhi- Magento2 code generationWebkul Software Pvt. Ltd.
 
Knockout JS Development - a Quick Understanding
Knockout JS Development - a Quick UnderstandingKnockout JS Development - a Quick Understanding
Knockout JS Development - a Quick UnderstandingUdaya Kumar
 
Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)vinaikopp
 
Magento 101: A technical overview
Magento 101: A technical overviewMagento 101: A technical overview
Magento 101: A technical overviewX.commerce
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JSHanoi MagentoMeetup
 
Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...
Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...
Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...meet_magento
 
Magento 2 Modules are Easy!
Magento 2 Modules are Easy!Magento 2 Modules are Easy!
Magento 2 Modules are Easy!Ben Marks
 
Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent MeetMagentoNY2014
 
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
 
Center of Hope Expansion
Center of Hope ExpansionCenter of Hope Expansion
Center of Hope Expansiontjmaurizio
 

Destaque (20)

E commerce trends
E commerce trendsE commerce trends
E commerce trends
 
Require js and Magento2
Require js and Magento2Require js and Magento2
Require js and Magento2
 
Ben Marks - Magento Inc.
Ben Marks - Magento Inc.Ben Marks - Magento Inc.
Ben Marks - Magento Inc.
 
Magento Meetup New Delhi- Magento2 Ui component
Magento Meetup New Delhi- Magento2 Ui componentMagento Meetup New Delhi- Magento2 Ui component
Magento Meetup New Delhi- Magento2 Ui component
 
Magento Meetup New Delhi- API
Magento Meetup New Delhi- APIMagento Meetup New Delhi- API
Magento Meetup New Delhi- API
 
Magento Meetup New Delhi- Magento2 plugins
Magento Meetup New Delhi- Magento2 pluginsMagento Meetup New Delhi- Magento2 plugins
Magento Meetup New Delhi- Magento2 plugins
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed Optimization
 
Magento Meetup New Delhi- Magento2 code generation
Magento Meetup New Delhi- Magento2 code generationMagento Meetup New Delhi- Magento2 code generation
Magento Meetup New Delhi- Magento2 code generation
 
Knockout JS Development - a Quick Understanding
Knockout JS Development - a Quick UnderstandingKnockout JS Development - a Quick Understanding
Knockout JS Development - a Quick Understanding
 
Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)
 
Knockout js
Knockout jsKnockout js
Knockout js
 
Magento 101: A technical overview
Magento 101: A technical overviewMagento 101: A technical overview
Magento 101: A technical overview
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
 
Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...
Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...
Александр Гальцов (aheadWorks) - Повышение эффективности сотрудничества в рам...
 
Magento 2 Modules are Easy!
Magento 2 Modules are Easy!Magento 2 Modules are Easy!
Magento 2 Modules are Easy!
 
Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent
 
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
 
Center of Hope Expansion
Center of Hope ExpansionCenter of Hope Expansion
Center of Hope Expansion
 
Haifa Al Mousa CV
Haifa Al Mousa CVHaifa Al Mousa CV
Haifa Al Mousa CV
 
Overall Equipment Efficiency
Overall Equipment EfficiencyOverall Equipment Efficiency
Overall Equipment Efficiency
 

Semelhante a Magento2 what's new in theming

Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentKapil Dev Singh
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deploymentSalaudeen Rajack
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization liteSharon James
 
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
 
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
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 
fuelOrigin.docx
fuelOrigin.docxfuelOrigin.docx
fuelOrigin.docxKanhaJi5
 
Best practice for magento theming by shrikant vaghela
Best practice for magento theming by shrikant vaghelaBest practice for magento theming by shrikant vaghela
Best practice for magento theming by shrikant vaghelavijaygolani
 
Magento2 frontend development
Magento2   frontend developmentMagento2   frontend development
Magento2 frontend developmentKapil Dev Singh
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in DrupalWingston
 
Introduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformIntroduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformJarne W. Beutnagel
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 Evan Mullins
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 featuresAngel Ruiz
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsSteve Keener
 

Semelhante a Magento2 what's new in theming (20)

Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend Development
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deployment
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
Grunt
GruntGrunt
Grunt
 
Grunt
GruntGrunt
Grunt
 
Grunt
GruntGrunt
Grunt
 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization lite
 
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
 
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...
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
fuelOrigin.docx
fuelOrigin.docxfuelOrigin.docx
fuelOrigin.docx
 
Best practice for magento theming by shrikant vaghela
Best practice for magento theming by shrikant vaghelaBest practice for magento theming by shrikant vaghela
Best practice for magento theming by shrikant vaghela
 
Magento2 frontend development
Magento2   frontend developmentMagento2   frontend development
Magento2 frontend development
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
 
Introduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformIntroduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce Platform
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Magento2 what's new in theming

  • 1. Magento2 What’s New in Theming Waruna Perera Senior Front End Software Engineer
  • 2. Agenda  New folder structure  Less instead of Sass  Layouts  UI Components / JS  Creating a New Theme
  • 4. New Folder Structure  No skin folder  New Pub Folder  All static files are published in Pub folder  Front End themes are located under app/design/frontend/<Vendor>/  Magento default themes can be found under vendor/magento/theme-frontend-<theme_code>
  • 7. Theme Inheritance  Static view files - css/js/fonts/images  Dynamic view files – less/templates/layouts Theme Files  Guarantees that if a view file is not found in the current theme, the system searches in the ancestor themes, module view files or library.  Parent theme is defined in the child theme theme.xml file  Static files can be overridden by adding a file with the same name on relevant location  .less (even though they are not static files) files are also overridden by a file with same name
  • 10. Extending Layouts  Unlike templates or images, layout can not be overridden, but only extended  Layouts are called in order of: I. Current them layouts II. Ancestor theme layouts III. Module layout for frontend area IV. Module layout for base area
  • 11. Include css files  /Magento_Theme/layout/default_head_blocks.xml  If the system does not find the included CSS files, it searches for the same file names with a .less extension. CSS files locations  Css files are located at : /module_name/web/css/ /web/css/
  • 13.  Css/js with module files
  • 14. Css pre-processor  Sass on magento1.9. Less on magento 2  Less files are stored in web/css/source folder Why Less? Not Sass?  Sass is widely used than less  Sass needs ruby to compilation  Less can be compiled with less resources- grunt, less.js
  • 15. Less compile methods 1. Server-side LESS compilation.  default compilation mode  compilation is performed on the server, using the LESS PHP library 2. Client-side LESS compilation.  compilation is performed on the browser using less.js library  Used on development mode
  • 16. Less compile methods Stores > Configuration > ADVANCED > Developer.
  • 17. Less compile with grunt  In server-side compilation mode, you can use the Grunt JavaScript task runner.  Need node.js installed  Install Grunt CLI  Install Grunt in your Magento directory  Install (or refresh) the node.js project dependency for your Magento instance  Add your theme to Grunt configuration - dev/tools/grunt/configs/themes.js
  • 18. Magento UI library  Flexible LESS-based frontend library designed to assist Magento theme developers.  It employs a set of mixins for base elements to ease frontend theme development and customization.  Located at lib/web/css  Action-toolbar, breadcrumbs, buttons, drop-downs, forms, icons, layout, loaders, messages, pagination, popups Inbuilt components
  • 20. Less Mixins  You can use a mixin with default variables values, or you can redefine them when calling a mixin.  Variables starting with _@ are private variables within a mixin.
  • 21. Require js  Including javascript on header can slow down page loading speed  Magento2 uses Require js library to overcome this problem  RequireJS improves the perceived page load time because it allows JavaScript to load in the background  It enables asynchronous javaScript loading.  RequireJS improves the speed and quality of your code by breaking large application into smaller manageable code  RequireJS loads plain JavaScript files as well as more defined modules  RequireJS only loads the JS script that the page needs. • require.js - appcodeMagentoThemeviewfrontendlayoutdefault_head_blocks.xml • requirejs-config.js - app/code/{Namespace}/{Module}/view/{area}/requirejs-config.js
  • 23. Creating a new theme

Notas do Editor

  1. Senior Front Developer – Also the team lead of magento Front end team Magento More than 3 years of magento
  2. Magento1 themes
  3. purpose of the PUB folder
  4. View.xml ins not needed if exists in the parent theme
  5. Pub – static All the compiled files stored here
  6. Static files- files that sent to the browser by the server without any processing Dynamic- these are also on same place on magento2
  7. Parent folder is defiend
  8. View.xml is not needed if included on ancestor theme
  9. XML can be extended
  10. Browser is requesting css from pub/static
  11. Css with modules Magento modularity
  12. Will you actually use them?
  13. Jquery is included asynchronous or “lazy” JavaScript loading.
  14. Database details are in env.php M1 – local.xml