SlideShare a Scribd company logo
1 of 14
URLs in Joomla
How to get it right
About me
• Hannes Papenberg
• Joomla Freelancer
• Longtime Joomla contributor
• Münster, Germany
• https://www.joomlager.de
What are we covering?
• Update your old component router
• Modify existing routers for your site
• What not to do anymore
Important: Ask!
Format for new Component Routers
Reminder of the past:
function contentBuildRoute(&$query) { ... }
function contentParseRoute($segments) { ... }
Format for new Component Routers
New Format
Class named <Component>Router
implementing
JoomlaCMSComponentRouterRouterInterf
ace
Easy shortcut: extend
JoomlaCMSComponentRouterRouterBase
Format for new Component Routers
• preprocess($query) - Cleanup URL
• build(&$query) - Build SEF URL
• parse(&$segments) - Parse SEF URL
Use the advanced new Component
Routers
• Extend from
JoomlaCMSComponentRouterRouterView
• Register the views of your component
• Create get<View>Segment() methods
• Create get<View>Id() methods
• Attach routing rules
Inject your own behavior into the site router
JoomlaCMSRouterRouter::attachBuildRule();
JoomlaCMSRouterRouter::attachParseRule();
... or the component router!
• $crouter = $router-
>getComponentRouter(<component>);
• $crouter->attachRule();
• $crouter->detachRule();
• $router->setComponentRouter($crouter2);
What not to do anymore!
• Don't add the Itemid to static links
• Don't calculate the Itemid outside of the
component router
• Don't add the Itemid to the URL in
*HelperRoute classes
Or in short: No Itemid outside of the router.
History of this feature
• 2009: First implementations
• 2012-2014: Several unsuccessfull attempts to
get attention for this feature
• 2014: crowdfunding campaign
• 2017: Last changes released as part of 3.8
Thanks to the contributors
I want to thank the contributors of the
crowdfunding campaign:
https://www.joomlager.de/de/crowdfunding/
contributors
Questions?
Thank you!

More Related Content

What's hot

One daytalk hbraun_oct2011
One daytalk hbraun_oct2011One daytalk hbraun_oct2011
One daytalk hbraun_oct2011
hbraun
 
Rails engines in large apps
Rails engines in large appsRails engines in large apps
Rails engines in large apps
Enrico Teotti
 

What's hot (20)

Namespace less engine
Namespace less engineNamespace less engine
Namespace less engine
 
AEM - A Collection of developer friendly tools
AEM - A Collection of developer friendly toolsAEM - A Collection of developer friendly tools
AEM - A Collection of developer friendly tools
 
Spring
SpringSpring
Spring
 
Ruby on Rails workshop for beginner
Ruby on Rails workshop for beginnerRuby on Rails workshop for beginner
Ruby on Rails workshop for beginner
 
The War on ActionView with Russian Doll Caching
The War on ActionView with Russian Doll CachingThe War on ActionView with Russian Doll Caching
The War on ActionView with Russian Doll Caching
 
OSGI module
OSGI moduleOSGI module
OSGI module
 
Creating Web Templates for SharePoint 2010
Creating Web Templates for SharePoint 2010Creating Web Templates for SharePoint 2010
Creating Web Templates for SharePoint 2010
 
Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimization
 
SFDC UI - Advanced Visualforce
SFDC UI - Advanced VisualforceSFDC UI - Advanced Visualforce
SFDC UI - Advanced Visualforce
 
Active Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy WayActive Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy Way
 
One daytalk hbraun_oct2011
One daytalk hbraun_oct2011One daytalk hbraun_oct2011
One daytalk hbraun_oct2011
 
Ruby w/o Rails (Олександр Сімонов)
Ruby w/o Rails (Олександр Сімонов)Ruby w/o Rails (Олександр Сімонов)
Ruby w/o Rails (Олександр Сімонов)
 
Website Launch Tips
Website Launch Tips Website Launch Tips
Website Launch Tips
 
SAP LVM Post Copy Automation Integration
SAP LVM Post Copy Automation IntegrationSAP LVM Post Copy Automation Integration
SAP LVM Post Copy Automation Integration
 
Rails Engines
Rails EnginesRails Engines
Rails Engines
 
Optimizing React at Postmates
Optimizing React at PostmatesOptimizing React at Postmates
Optimizing React at Postmates
 
Rails 3 Asset Pipeline
Rails 3 Asset PipelineRails 3 Asset Pipeline
Rails 3 Asset Pipeline
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
 
Rails engines in large apps
Rails engines in large appsRails engines in large apps
Rails engines in large apps
 
Configuration Management in WordPress
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
 

Similar to URLs in Joomla - How to get it right

Maintainable Sitecore Solutions
Maintainable Sitecore SolutionsMaintainable Sitecore Solutions
Maintainable Sitecore Solutions
Thomas Eldblom
 
Getting to 2010 SharePoint Saturday Sacramento 2012
Getting to 2010 SharePoint Saturday Sacramento 2012Getting to 2010 SharePoint Saturday Sacramento 2012
Getting to 2010 SharePoint Saturday Sacramento 2012
bbdegraaf
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
Henry S
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
bartzon
 

Similar to URLs in Joomla - How to get it right (20)

Maintainable Sitecore Solutions
Maintainable Sitecore SolutionsMaintainable Sitecore Solutions
Maintainable Sitecore Solutions
 
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the EnterpriseEnvision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
 
Search engine optimization (seo) from Endeca & ATG
Search engine optimization (seo) from Endeca & ATGSearch engine optimization (seo) from Endeca & ATG
Search engine optimization (seo) from Endeca & ATG
 
Vibe Custom Development
Vibe Custom DevelopmentVibe Custom Development
Vibe Custom Development
 
Tech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityTech Talk Live on Share Extensibility
Tech Talk Live on Share Extensibility
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
 
Tridion Content Broker - how and why we are using it at the RSPB (2007)
Tridion Content Broker - how and why we are using it at the RSPB (2007)Tridion Content Broker - how and why we are using it at the RSPB (2007)
Tridion Content Broker - how and why we are using it at the RSPB (2007)
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
 
Getting to 2010 SharePoint Saturday Sacramento 2012
Getting to 2010 SharePoint Saturday Sacramento 2012Getting to 2010 SharePoint Saturday Sacramento 2012
Getting to 2010 SharePoint Saturday Sacramento 2012
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012
 
Remix
RemixRemix
Remix
 
Unleashing the Power: A Lap Around PowerShell 3.0
Unleashing the Power: A Lap Around PowerShell 3.0Unleashing the Power: A Lap Around PowerShell 3.0
Unleashing the Power: A Lap Around PowerShell 3.0
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
 
Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
SharePoint 2010 branding
SharePoint 2010 brandingSharePoint 2010 branding
SharePoint 2010 branding
 
The Path through SharePoint Migrations
The Path through SharePoint MigrationsThe Path through SharePoint Migrations
The Path through SharePoint Migrations
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT Pros
 

Recently uploaded

一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 

Recently uploaded (20)

一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 

URLs in Joomla - How to get it right

  • 1. URLs in Joomla How to get it right
  • 2. About me • Hannes Papenberg • Joomla Freelancer • Longtime Joomla contributor • Münster, Germany • https://www.joomlager.de
  • 3. What are we covering? • Update your old component router • Modify existing routers for your site • What not to do anymore Important: Ask!
  • 4. Format for new Component Routers Reminder of the past: function contentBuildRoute(&$query) { ... } function contentParseRoute($segments) { ... }
  • 5. Format for new Component Routers New Format Class named <Component>Router implementing JoomlaCMSComponentRouterRouterInterf ace Easy shortcut: extend JoomlaCMSComponentRouterRouterBase
  • 6. Format for new Component Routers • preprocess($query) - Cleanup URL • build(&$query) - Build SEF URL • parse(&$segments) - Parse SEF URL
  • 7. Use the advanced new Component Routers • Extend from JoomlaCMSComponentRouterRouterView • Register the views of your component • Create get<View>Segment() methods • Create get<View>Id() methods • Attach routing rules
  • 8. Inject your own behavior into the site router JoomlaCMSRouterRouter::attachBuildRule(); JoomlaCMSRouterRouter::attachParseRule();
  • 9. ... or the component router! • $crouter = $router- >getComponentRouter(<component>); • $crouter->attachRule(); • $crouter->detachRule(); • $router->setComponentRouter($crouter2);
  • 10. What not to do anymore! • Don't add the Itemid to static links • Don't calculate the Itemid outside of the component router • Don't add the Itemid to the URL in *HelperRoute classes Or in short: No Itemid outside of the router.
  • 11. History of this feature • 2009: First implementations • 2012-2014: Several unsuccessfull attempts to get attention for this feature • 2014: crowdfunding campaign • 2017: Last changes released as part of 3.8
  • 12. Thanks to the contributors I want to thank the contributors of the crowdfunding campaign: https://www.joomlager.de/de/crowdfunding/ contributors