SlideShare a Scribd company logo
JLayout..
for extension developers
Start using future Joomla renderer today
Dedicated to Manuel Rubio
● Died 15th May 2015
● Opensource lover
● Joomla spanish magazine contributor
● Spanish translator / coordinator
● JUG Barcelona member
@mannuelru
About me
● PHP / Javascript Freelance
● PHP developer since 2010
● Joomla! lover & contributor since 2011
● Top 25 Joomla CMS contributors
● Opensource lover
● Linux user
● Git for everything
● Gulp all the things
@phproberto
¿What is JLayout?
● Rendering system
● Contributed by Yannick Gaultier
● Initially created to render sidebar
● A renderer that is now better than a
lot of other existing renderers
● The future of Joomla!
● Long way to walk
What can I use JLayout for?
● Render modules
● Render plugins
● Render component views
● Render fields
● Render anything!
Where can I find it?
JLayout include paths
Enable debug mode to see where your
layout is being loaded from
JLayout supports overriding by default
JLayout advantages
● Used in core
● Reusability
● Overridable
● Data / View separation
● Debuggable
● Data & layouts inheritance
● Cacheable
● Extensible
How is JLayout helping core?
● Remove dependencies (Mootools, Bootstrap2)
● Customise all the markup
● Custom modals
● Follow best practices
● Replaceable renderer
● Extension customisations
How is it used?
Layout to render
Example: article.tags
Layout Data
Example: array(‘article’ => $item)
Layouts base path
Example: JPATH_SITE .
/plugins/content/myplugin/layouts’
Options
Example: array(‘debug’ => true)
Complex usage
What should I use?
● In classes instances
● In layouts helpers
Handy PHP functions: extract()
Avoid things like:
$displayData[‘view’]->doSomething();
Handy PHP functions: compact()
Best practices
● Always pass data to layouts as an array
● Send only required data
● Use global debug mode
● Divide layouts in smaller parts
○ article
○ article.title
○ article.description.introtext
Best practices: Think JLayout
● An article can be shown in a module like in a view.
● Form layouts can be shared in front & backend
● An article slider can be shown in a category and in
a module.
● Same markup can be styled differently depending
in container.
○ <div class=”article-box”>
■ <h2 class=”article-title”>Joomla!</h2>
Best practices: Comment layout vars
Templaters don’t know the logic behind your app!
Best practices: Extend JLayout
Not for templaters!
Best practices: Extend JLayout (II)
Helper will use our own renderer
Best practices: getRenderer()
Best practices: getLayoutPaths()
Best practices: getLayoutData()
Best practices: getLayoutData() II
Extending data
JLayout for fields
Fields can use a different layout in form settings
Same field logic used to render things differently, add JS
libraries, etc.
JLayout for fields II
Try to use your own prefix
JLayout for libraries
● If it outputs HTML it has to be overridable
● If it loads assets templaters need to control it
JLayout with AJAX
● Return rendered information
● Load more items in a module
with lazyload / button click
● Change grid / list view
● Display forms where needed
JLayout with AJAX: Example
JLayout for templates
● Same markup. Your standard?
● Your layouts can be used in
multiple overrides without
changing them.
● Forms wherever you need them
● Layouts for different frameworks
JLayout for modules
● Debug switcher
● Module layouts inheritance
● Live module layout switcher with
com_ajax + JLayout
● AJAX to load more slider images
JLayout for plugins
● Debug switcher
● Finally your plugin is overridable
● Plugins can be shown differently
in different components.
● Plugins can reuse base component
layouts to render articles,etc.
That’s all!
Questions?

More Related Content

PDF
Joomla JLayout
PDF
Agile work practices and tools
PPTX
Html &amp; css
PDF
Js design patterns
ODP
Git for Moodle Administrators
ODP
Caching and Performance Improvememts in Joomla
PDF
Beyond the web: Mobile apps using Drupal & Ionic 2 - Drupal Dev Days Seville ...
PDF
Drupal Contribution
Joomla JLayout
Agile work practices and tools
Html &amp; css
Js design patterns
Git for Moodle Administrators
Caching and Performance Improvememts in Joomla
Beyond the web: Mobile apps using Drupal & Ionic 2 - Drupal Dev Days Seville ...
Drupal Contribution

What's hot (19)

PDF
Bloc TechTalk - How to Setup Your Android Development Environment
PDF
Moodley Session #02 - pattern libraries
PDF
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
PDF
[NijmegenJS] Node.js - 2014/04/25
PPTX
Scrum introduction
PDF
Git intro fajar muslim
PDF
Can android be an http server
PPTX
Webdev bootcamp
PDF
Introduction to Google Web Toolkit - part 1
ODP
Configure python and wsgi
PDF
(some) Drupal Theming by Ryan Price
PDF
Using twig as rendering system for your Joomla extensions
PPTX
Master your debugger
PDF
Teach yourself Ruby on Rails
PDF
RealDay: Angular.js
PDF
GDG Varna - When Android Meets Maps
PDF
TypeScript
PDF
Translating Fedora Documentation: Indonesian Team Perspective
PDF
Plugins on word press
Bloc TechTalk - How to Setup Your Android Development Environment
Moodley Session #02 - pattern libraries
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
[NijmegenJS] Node.js - 2014/04/25
Scrum introduction
Git intro fajar muslim
Can android be an http server
Webdev bootcamp
Introduction to Google Web Toolkit - part 1
Configure python and wsgi
(some) Drupal Theming by Ryan Price
Using twig as rendering system for your Joomla extensions
Master your debugger
Teach yourself Ruby on Rails
RealDay: Angular.js
GDG Varna - When Android Meets Maps
TypeScript
Translating Fedora Documentation: Indonesian Team Perspective
Plugins on word press
Ad

Similar to JLayout for extension developers (20)

ODP
Hong Kong Drupal User Group - 2014 March 8th
PDF
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
ODP
Contributions: what they are and how to find them
PPTX
Becoming A Drupal Master Builder
PDF
Drupal 8, tricks and tips learned from the first 6 months
PDF
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
PDF
The Workflow Methodology to Train Your Team on Drupal 8
PDF
Android Modularization
PDF
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
ODP
Problemen oplossen in Joomla - Joomladagen 2014
ODP
Joomla - CMS
PDF
Implementing a Symfony Based CMS in a Publishing Company
ODP
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
PPTX
Introduction to Django
PDF
Joomla! future #jd14fr keynote
PPT
Joomla! Templates and Comparison of Frameworks
PPTX
Decoupled drupal + vue.js
PPTX
UX DURING MODULE INSTALLATION AND CONFIGURATION
PDF
Boltc CMS - a really quick overview
PDF
Complexity Simplified? (Seblod CCK walk through)
Hong Kong Drupal User Group - 2014 March 8th
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Contributions: what they are and how to find them
Becoming A Drupal Master Builder
Drupal 8, tricks and tips learned from the first 6 months
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
The Workflow Methodology to Train Your Team on Drupal 8
Android Modularization
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
Problemen oplossen in Joomla - Joomladagen 2014
Joomla - CMS
Implementing a Symfony Based CMS in a Publishing Company
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
Introduction to Django
Joomla! future #jd14fr keynote
Joomla! Templates and Comparison of Frameworks
Decoupled drupal + vue.js
UX DURING MODULE INSTALLATION AND CONFIGURATION
Boltc CMS - a really quick overview
Complexity Simplified? (Seblod CCK walk through)
Ad

More from Roberto Segura (7)

PDF
TDD for joomla extensions
PDF
Joomla Entity - API semántica para Joomla
PDF
Uso de tecnologías modernas en joomla
PDF
Plugin para-joomla-45-minutos
PDF
Introducción a la programación para joomla
PDF
Git for joomla! development #JAB14
PDF
Introduccción a la programación en Joomla!
TDD for joomla extensions
Joomla Entity - API semántica para Joomla
Uso de tecnologías modernas en joomla
Plugin para-joomla-45-minutos
Introducción a la programación para joomla
Git for joomla! development #JAB14
Introduccción a la programación en Joomla!

Recently uploaded (20)

PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Nekopoi APK 2025 free lastest update
PDF
top salesforce developer skills in 2025.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Softaken Excel to vCard Converter Software.pdf
Operating system designcfffgfgggggggvggggggggg
Navsoft: AI-Powered Business Solutions & Custom Software Development
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Understanding Forklifts - TECH EHS Solution
Internet Downloader Manager (IDM) Crack 6.42 Build 41
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Nekopoi APK 2025 free lastest update
top salesforce developer skills in 2025.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
How Creative Agencies Leverage Project Management Software.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
VVF-Customer-Presentation2025-Ver1.9.pptx

JLayout for extension developers

  • 1. JLayout.. for extension developers Start using future Joomla renderer today
  • 2. Dedicated to Manuel Rubio ● Died 15th May 2015 ● Opensource lover ● Joomla spanish magazine contributor ● Spanish translator / coordinator ● JUG Barcelona member @mannuelru
  • 3. About me ● PHP / Javascript Freelance ● PHP developer since 2010 ● Joomla! lover & contributor since 2011 ● Top 25 Joomla CMS contributors ● Opensource lover ● Linux user ● Git for everything ● Gulp all the things @phproberto
  • 4. ¿What is JLayout? ● Rendering system ● Contributed by Yannick Gaultier ● Initially created to render sidebar ● A renderer that is now better than a lot of other existing renderers ● The future of Joomla! ● Long way to walk
  • 5. What can I use JLayout for? ● Render modules ● Render plugins ● Render component views ● Render fields ● Render anything!
  • 6. Where can I find it?
  • 7. JLayout include paths Enable debug mode to see where your layout is being loaded from JLayout supports overriding by default
  • 8. JLayout advantages ● Used in core ● Reusability ● Overridable ● Data / View separation ● Debuggable ● Data & layouts inheritance ● Cacheable ● Extensible
  • 9. How is JLayout helping core? ● Remove dependencies (Mootools, Bootstrap2) ● Customise all the markup ● Custom modals ● Follow best practices ● Replaceable renderer ● Extension customisations
  • 10. How is it used? Layout to render Example: article.tags Layout Data Example: array(‘article’ => $item) Layouts base path Example: JPATH_SITE . /plugins/content/myplugin/layouts’ Options Example: array(‘debug’ => true)
  • 11. Complex usage What should I use? ● In classes instances ● In layouts helpers
  • 12. Handy PHP functions: extract() Avoid things like: $displayData[‘view’]->doSomething();
  • 13. Handy PHP functions: compact()
  • 14. Best practices ● Always pass data to layouts as an array ● Send only required data ● Use global debug mode ● Divide layouts in smaller parts ○ article ○ article.title ○ article.description.introtext
  • 15. Best practices: Think JLayout ● An article can be shown in a module like in a view. ● Form layouts can be shared in front & backend ● An article slider can be shown in a category and in a module. ● Same markup can be styled differently depending in container. ○ <div class=”article-box”> ■ <h2 class=”article-title”>Joomla!</h2>
  • 16. Best practices: Comment layout vars Templaters don’t know the logic behind your app!
  • 17. Best practices: Extend JLayout Not for templaters!
  • 18. Best practices: Extend JLayout (II) Helper will use our own renderer
  • 22. Best practices: getLayoutData() II Extending data
  • 23. JLayout for fields Fields can use a different layout in form settings Same field logic used to render things differently, add JS libraries, etc.
  • 24. JLayout for fields II Try to use your own prefix
  • 25. JLayout for libraries ● If it outputs HTML it has to be overridable ● If it loads assets templaters need to control it
  • 26. JLayout with AJAX ● Return rendered information ● Load more items in a module with lazyload / button click ● Change grid / list view ● Display forms where needed
  • 28. JLayout for templates ● Same markup. Your standard? ● Your layouts can be used in multiple overrides without changing them. ● Forms wherever you need them ● Layouts for different frameworks
  • 29. JLayout for modules ● Debug switcher ● Module layouts inheritance ● Live module layout switcher with com_ajax + JLayout ● AJAX to load more slider images
  • 30. JLayout for plugins ● Debug switcher ● Finally your plugin is overridable ● Plugins can be shown differently in different components. ● Plugins can reuse base component layouts to render articles,etc.