May The Core Be With You
About this talk
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
Why Use More Core?
Easier Upgrades
Extension Compatibility
May the core be with you - JandBeyond 2014
Knowledge Transfer
Future Proof
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
How To:
Make The Most Out of Core
Example 1:
Carousel With Modules
Order of Operations
1. Add chrome to modules.php
2. Add position to template index.php
3. Add new custom module layout
4. Add module instances to position
5. Check the result
function modChrome_carouselInner($module, &$params,
$attribs)
{
$img = $params->get('backgroundimage');
$sfx = htmlspecialchars($params-
>get('moduleclass_sfx'));
if ($module->content) {
echo "<div class="item" . $sfx . "">";
echo "<img src="" . $img . "" >";
echo "<div class="carousel-caption">";
echo $module->content;
echo "</div>";
echo "</div>";
}
}
modules.php
<?php if ($this->countModules('carousel')): ?>
<div id="bootstrap-carousel" class="carousel slide">
<div class="carousel-inner">
<jdoc:include type="modules"
name="carousel"
style="carouselInner"
/>
</div>
<a class="carousel-control left"
href="#bootstrap-carousel" data-slide="prev">
&lsaquo;
</a>
<a class="carousel-control right"
href="#bootstrap-carousel" data-slide="next">
&rsaquo;
</a>
</div>
<?php endif; ?>
template’s index.php
<?php echo $module->content; ?>
mod_custom new layout
Sanity Check
File Locations
Template Index File (new module positon):
<jroot>/templates/my_template/index.php
Modules.php File (new module chrome):
<jroot>/templates/my_template/html/modules.php
Custom Module Layout (for mod_custom):
<jroot>/templates/my_template/html/mod_custom/text.php
May the core be with you - JandBeyond 2014
Position: carousel
Content: description text
Div Class: active (first slide/module)
Title: slide title
Background Image: Slide Image
Select new alternate layout
Results
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
Example 2:
Alternate Category Layout
Order of Operations
1. Copy some view files to the template
2. Make some minor code changes
a. this is an ‘alternate layout’
3. Add new menu item
4. Check the result
Copy view files to template
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout
title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE"
option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
<help
key =
"JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_BLOG"
/>
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_
DESC]]>
</message>
</layout>
blog.xml
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout
title="COM_CONTENT_CATEGORY_VIEW_ACCORDION_TITLE"
option="COM_CONTENT_CATEGORY_VIEW_ACCORDION_OPTIO
N">
<help
key =
"JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_BLOG"
/>
<message>
<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_
DESC]]>
</message>
</layout>
accordion.xml
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle"
data-toggle="collapse"
data-parent="#cat-accord-<?php echo
$this->item->catid; ?>"
href="#accordion-<?php echo $this->item-
>id; ?>">
<?php echo $this->item->title; ?>
</a>
</div>
<div id="accordion-<?php echo $this->item->id; ?>"
class="accordion-body
collapse">
<?php // the content ?>
</div>
</div>
accordion_item.php
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
Let’s just recap
May the core be with you - JandBeyond 2014
500+ Extensions!?
(Or we could just use core…)
Example 3:
Language Manager ‘Hack’
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
<?php // some view, or model, or controller, or anything ?>
<?php echo JText::_('GLOBAL_CONSTANT'); ?>
<?php // the rest of your code ?>
Any Code in Joomla!
What’s next?
May the core be with you - JandBeyond 2014
Bloated CMS
May the core be with you - JandBeyond 2014
Improve the CMS
Be Creative
Thanks!
May the core be with you - JandBeyond 2014
“Fear is the path to the Dark Side. Fear leads to anger, anger
leads to hate, hate leads to suffering.”
- Yoda
Better Understood as:
“Extensions are the path to the dark side. Extensions lead to
migration problems, swearing and suffering.”
- Unknown

More Related Content

PPTX
Ch2(working with forms)
PDF
How to create a magento controller in magento extension
PDF
How to Create A Magento Adminhtml Controller in Magento Extension
PPTX
Using of TDD practices for Magento
ODP
Angular js filters and directives
PDF
Utilization of zend an ultimate alternate for intense data processing
PDF
How to Develop a Basic Magento Extension Tutorial
PPT
Coldfusion Tips and Tricks
Ch2(working with forms)
How to create a magento controller in magento extension
How to Create A Magento Adminhtml Controller in Magento Extension
Using of TDD practices for Magento
Angular js filters and directives
Utilization of zend an ultimate alternate for intense data processing
How to Develop a Basic Magento Extension Tutorial
Coldfusion Tips and Tricks

What's hot (20)

PPTX
Fixing Magento Core for Better Performance - Ivan Chepurnyi
PPTX
Magento 2.0: Prepare yourself for a new way of module development
PPTX
Top Wordpress dashboard hacks
PDF
Magento20100313
PPTX
Optimizing Magento by Preloading Data
PDF
Best Practices for Magento Debugging
PDF
Magento20100226
PDF
Drupal 8 Services
PPTX
Html tags slides 2016
PPTX
Java script functions
PDF
Implement rich snippets in your webshop
PDF
Mason - A Template system for us Perl programmers
PPTX
Blade Template and Laravel
PPTX
Drupal 7 — Circle theme
PDF
Magento20100709
PDF
Demystifying Hooks, Actions & Filters - WordCamp Belfast 2018
PPTX
Django: Advanced Models
PDF
Getting to The Loop - London Wordpress Meetup July 28th
PDF
Drupal 8 版型開發變革
PPTX
WooCommerce filters
Fixing Magento Core for Better Performance - Ivan Chepurnyi
Magento 2.0: Prepare yourself for a new way of module development
Top Wordpress dashboard hacks
Magento20100313
Optimizing Magento by Preloading Data
Best Practices for Magento Debugging
Magento20100226
Drupal 8 Services
Html tags slides 2016
Java script functions
Implement rich snippets in your webshop
Mason - A Template system for us Perl programmers
Blade Template and Laravel
Drupal 7 — Circle theme
Magento20100709
Demystifying Hooks, Actions & Filters - WordCamp Belfast 2018
Django: Advanced Models
Getting to The Loop - London Wordpress Meetup July 28th
Drupal 8 版型開發變革
WooCommerce filters
Ad

Viewers also liked (7)

PPTX
Getting Involved in the Joomla Community
PPTX
مشروع الإشراف بالوحدة
PPTX
Fall 2010 goods
ZIP
YAPC::Asia2010 DataPortability and SocialWeb Protocols
PPT
طرق تدريس الأحياء
DOC
Qawaid fiqhiyyah sebagai
PDF
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
Getting Involved in the Joomla Community
مشروع الإشراف بالوحدة
Fall 2010 goods
YAPC::Asia2010 DataPortability and SocialWeb Protocols
طرق تدريس الأحياء
Qawaid fiqhiyyah sebagai
XMPP/Jingle(VoIP)/Perl Ocean 2012/03
Ad

Similar to May the core be with you - JandBeyond 2014 (20)

PDF
Extending CMS Made Simple
PPTX
Magento mega menu extension
PDF
Modul-Entwicklung für Magento, OXID eShop und Shopware (2013)
KEY
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
PDF
Joomla 1.5 modules - Joomla!Days NL 2009 #jd09nl
PPT
Clever Joomla! Templating Tips and Tricks
PDF
How to Write Custom Modules for PHP-based E-Commerce Systems (2011)
PPTX
4.content mgmt
PDF
Joomla! Template for Beginners
PPTX
Techgig Webinar: Joomla Introduction and Module Development June 2012
PDF
Joomla 101!
PPTX
Building Potent WordPress Websites
PDF
Building A Tasty Backend
PPTX
Modules and Components Introduction in Joomla! 2.5
PPTX
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
PDF
A2WPress Andrina Theme Documentation
PPTX
Start a Blog: Module 6
PPTX
WordPress plugin #3
PPTX
Finding Your Way: Understanding Magento Code
PPT
Joomla Beginner Template Presentation
Extending CMS Made Simple
Magento mega menu extension
Modul-Entwicklung für Magento, OXID eShop und Shopware (2013)
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Joomla 1.5 modules - Joomla!Days NL 2009 #jd09nl
Clever Joomla! Templating Tips and Tricks
How to Write Custom Modules for PHP-based E-Commerce Systems (2011)
4.content mgmt
Joomla! Template for Beginners
Techgig Webinar: Joomla Introduction and Module Development June 2012
Joomla 101!
Building Potent WordPress Websites
Building A Tasty Backend
Modules and Components Introduction in Joomla! 2.5
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
A2WPress Andrina Theme Documentation
Start a Blog: Module 6
WordPress plugin #3
Finding Your Way: Understanding Magento Code
Joomla Beginner Template Presentation

More from Chad Windnagle (9)

PPTX
Managing Technical Debt - WordCamp Orlando 2017
PPTX
Get queued
PPTX
Good dev citizen
PDF
Joomla tempates talk
PPTX
Google Summer of Code Presentation - JWC12
PPTX
Template overrides austin
PPTX
Joomla Essential Extensions
PPTX
Developing joomla 1.6 templates - Joomla!Day NYC December 2010
PPT
Developing joomla 1.6 templates
Managing Technical Debt - WordCamp Orlando 2017
Get queued
Good dev citizen
Joomla tempates talk
Google Summer of Code Presentation - JWC12
Template overrides austin
Joomla Essential Extensions
Developing joomla 1.6 templates - Joomla!Day NYC December 2010
Developing joomla 1.6 templates

Recently uploaded (20)

PPTX
CASEWORK Pointers presentation Field instruction I
PPTX
Unit 8#Concept of teaching and learning.pptx
PPTX
Paraphrasing Sentence To Make Your Writing More Interesting
PPTX
Religious Thinkers Presentationof subcontinent
PPTX
INDIGENOUS-LANGUAGES-AND-LITERATURE.pptx
PPT
Lessons from Presentation Zen_ how to craft your story visually
PPTX
Kompem Part Untuk MK Komunikasi Pembangunan 5.pptx
PDF
soft skills for kids in India - LearnifyU
PPTX
Pharmaceutical industry and drugdevelopment.pptx
PPTX
Bob Difficult Questions 08 17 2025.pptx
PPTX
CAPE CARIBBEAN STUDIES- Integration-1.pptx
PPTX
CASEWORK Power Point Presentation - pointers
PDF
Unnecessary information is required for the
PPTX
TG Hospitality workshop Vietnam (1).pptx
PPTX
Literatura en Star Wars (Legends y Canon)
PPTX
Lesson 2 (Technology and Transmission) - Terms.pptx
PPTX
Ulangan Harian_TEOREMA PYTHAGORAS_8.pptx
PPTX
power point presentation ofDracena species.pptx
PPTX
Public Speaking Is Easy . Start Now . It's now or never.
PDF
Yoken Capital Network Presentation Slide
CASEWORK Pointers presentation Field instruction I
Unit 8#Concept of teaching and learning.pptx
Paraphrasing Sentence To Make Your Writing More Interesting
Religious Thinkers Presentationof subcontinent
INDIGENOUS-LANGUAGES-AND-LITERATURE.pptx
Lessons from Presentation Zen_ how to craft your story visually
Kompem Part Untuk MK Komunikasi Pembangunan 5.pptx
soft skills for kids in India - LearnifyU
Pharmaceutical industry and drugdevelopment.pptx
Bob Difficult Questions 08 17 2025.pptx
CAPE CARIBBEAN STUDIES- Integration-1.pptx
CASEWORK Power Point Presentation - pointers
Unnecessary information is required for the
TG Hospitality workshop Vietnam (1).pptx
Literatura en Star Wars (Legends y Canon)
Lesson 2 (Technology and Transmission) - Terms.pptx
Ulangan Harian_TEOREMA PYTHAGORAS_8.pptx
power point presentation ofDracena species.pptx
Public Speaking Is Easy . Start Now . It's now or never.
Yoken Capital Network Presentation Slide

May the core be with you - JandBeyond 2014

Editor's Notes

  • #3: I wanted to do a talk about using the Joomla core as much as possible. I believe this is a trend in the community right now and a very good one. It’s a little strange to talk about because in general, the whole point of using a CMS like Joomla is that its expandable and there’s tons of extensions available for it. So this is a bit counter culture to that idea. But to me its important to know, explore and push the limits of the core CMS as much as possible. We know that the CMS is powerful, and I think in a perfect world we’ll have a core that can cover most user’s and developers most primal needs for technology. If we are a little more resistant to just installing extensions to solve problems, but instead investigate ways to push the limits of the core a bit further, I believe we will end up with a CMS that is more powerful, more functional, and able to meet more needs. Of course, we don’t want to make a large core, we just want to make a flexible one. So the intent here has to be a balance between function and flexibility versus slim core and powerful distribution. Distributions may come along and help solve a lot of these problems - fingers crossed - but for now this is where we are at so that’s what I’m focused on. So I knew with a title like may the core be with you, some people were really expecting or hoping we would see a title slide a lot more like this!
  • #5: So with that title slide out of the way - you can expect to see a few more photos that are going to play on the star wars themes. I hope there’s some fans!
  • #6: So let me explain why I think using the core as much as possible is important. I already mentioned a little bit about what I think the results of this will be in the overall vision of this talk. But why should we do this? I believe that using the core as much as possible makes our lives easier as developers. There’s a few reasons for this.
  • #7: The first is that updates and upgrades are just easier. If you know all your content is stored in com_content, you can feel reasonably certain that an update to Joomla isn’t going to break things for you. But if your content is stored in something like a 3rd party CCK, then you’ve immediately got more work on your hands. You need to check things like compatibility of the extension, the modules you might be using, and ensure that things will continue to run.
  • #8: The end result of this extension compatibility issue can also be a security issue. Look at this example from Fabrik where users were told that they couldn’t update to a newer version of Joomla due to their compatibility. What if this had been a major security issue? Sites get hacked this way. There can be some pretty serious side effects from placing your life in the hands of other developers. Granted this is small case and probably not a big issue, but it can easily become one if you’re not careful.
  • #9: The end result of this extension compatibility issue can also be a security issue. I know you can’t read this text, but it warns users of Joomla 3.2 to NOT update to Joomla 3.3 due to some compatibility issues. Now what if this had been a major security issue? Sites get hacked this way. There can be some pretty serious side effects from placing your life in the hands of other developers. Granted this is small case and probably not a big issue, but it can easily become one if you’re not careful.
  • #10: Knowledge transfer. We host 200 websites, and we have some clients that have 3 or 4 sites with us. Imagine how much of a pain it would be if we had to train them on joomla content, and then a CCK, and then a blogging application, etc.. etc… It’s confusing. We had many clients log into Joomla and ask us where content was. It was there -- inside of K2, but not in com_content. This is highly confusing to users. We have a small staff as well but we’re all able to pretty much move between sites we’re concurrently developing without ever being on the site before because we’re consistent in how we build this. But overall if you can be confident that you’ve built sites consistently, when you log into them you’ll know where everything is, and so will people who’ve never been in the system before who are just starting out. Consistency will make your life better and you’ll be able to switch between the sites you’re working on if you do everything the same all the time.
  • #11: Future proof. The Joomla 1.5 to 1.6 migrations and on should be a good lesson to everyone that migrations can be expensive, time consuming pains in the rear! The lesson we learned was that core content is in general easy to migrate. Migrating other extensions and their data was a pain. This is because the user base of those other extensions was small, the number of users testing the code and doing the migrations was far less, and so bugs and other issues were rampant. If you stick to core you’re almost certain to have more than one case of migration issues, and that means solutions and resolutions for your issues.
  • #12: Everything in moderation I don’t want to paint the picture that 3rd party extensions should be entirely avoided. We still use some here. But I can most certainly say that we spend more time with those sites. Now we selected other solutions for important reasons, and we knew that the ongoing work was going to be more effort, but it was necessary to get the job done as best as possible. So use third party solutions when it’s necessary, but think about the long term effects of this - give yourself an out!
  • #13: Alright so now that we’ve established the basic ideas that we probably should try to use the core as much as possible. At this point I can come down off my soapbox and actually paint a picture of how we can use core to the best of our abilities. Its time to learn how to make the most out of the this powerful tool. Use the force,right?
  • #14: I’ve put together a few examples of how we can do some ‘every’ tasks that we often go outside of Joomla to implement. I hope you find these solutions useful to you and you’ll use them as a way to be creative and come up with your own implementations. I have some examples on different ways to use the core. Keep in mind, these are examples. They’re intended really to provoke your curiousity and help you think about exploring some similar solutions for your own projects.
  • #15: Alright so my first example is pretty simple. We’re going to create a carousel using custom html modules. This requires some custom code in our template but that’s it!
  • #16: So I wanted to just do a quick overview of the steps we’re going to be taking here. First we’re going to add a bit of custom code to two places, pretty simple stuff, then we will create a new layout file. After that we can add our module positions and check the result.
  • #17: Use the module manager to create custom html modules. Put the description text in the text area, use the background image field to specify the image location. use a custom position (eg carousel) for use in the template later on.
  • #18: Use the module manager to create custom html modules. Put the description text in the text area, use the background image field to specify the image location. use a custom position (eg carousel) for use in the template later on.
  • #19: What we’re going to do here is create a new custom layout in the template by creating a new layout file. The default layout file is called default.php. We’ll create a new one called text.php. The contents of this file will be pretty basic. We’re just going to print out the pure content from the module. We don’t want any of the extra html as that will just get in the way in this case.
  • #20: So before we go any further I just want to give everyone a quick review of where the files are located here just incase this wasn’t obvious! We’ve worked with 3 files at this point. The template’s main markup file, the modules.php file which is for creating and adding custom markup to module output, and then created a new layout file for the custom html module. So hopefully everyone is on the right page here. Let’s go to the next step of this process and add some new modules to our site.
  • #21: Use the module manager to create custom html modules. Put the description text in the text area, use the background image field to specify the image location. use a custom position (eg carousel) for use in the template later on.
  • #22: Use the module manager to create custom html modules. Put the description text in the text area, use the background image field to specify the image location. use a custom position (eg carousel) for use in the template later on.
  • #23: Use the module manager to create custom html modules. Put the description text in the text area, use the background image field to specify the image location. use a custom position (eg carousel) for use in the template later on.
  • #25: Alright so my first example is pretty simple. We’re going to create a carousel using custom html modules. This requires some custom code in our template but that’s it!
  • #28: Alright so my first example is pretty simple. We’re going to create a carousel using custom html modules. This requires some custom code in our template but that’s it!
  • #29: So here’s another overview for the set up. This is a bit more code heavy than the last one but its pretty useful tool. Let’s see what we can do here!
  • #30: This is a screenshot of the files we’re going to end up working with. We have the view files for com_content, and we’re going to copy them over to our template, and then rename them.
  • #31: Here’s the default blog xml. The .xml is parsed by the menu manager to create menu types. We’re going to rename it from blog to accordion, and we’ll change some of the language strings so it shows up differently in the menu manager. Let’s see what we change.
  • #32: You can see here all I did was change the name and the language string. If you want to get really detailed you could change the description and some other areas too to add custom language strings. Not necessary for the examples we’re going to be doing but useful for production sites.
  • #33: What I’ve done is really modified the view file so that it outputs some bootstrap markup. As you should be able pick up by now we are creating an accordion out of boostrap code. This markup will be the what Bootstrap automatically loads and looks for to generate accordions. It sets up the accordion group and pulls the category id for a proper data parent, and then uses the article title for the accordion selector, and the content as the accordion body.
  • #37: Alright so we’ve got two working examples now. Let’s recap and see what we’ve got going on here.
  • #38: So this image shows us that there are 100 rotator extensions for Joomla, and an astounding 420 extensions for slideshows.
  • #39: So we could install one of those 500+ extensions...or we could just use the core. That’s amazing I think!
  • #40: Alright so my first example is pretty simple. We’re going to create a carousel using custom html modules. This requires some custom code in our template but that’s it!
  • #43: Use the module manager to create custom html modules. Put the description text in the text area, use the background image field to specify the image location. use a custom position (eg carousel) for use in the template later on.
  • #44: Okay - so this is the end of what I really wanted to demonstrate to you. But it’s not the end of what I want to talk about. There’s just a few more things I want to say about this topic. And that is, I want to talk about improving the CMS a bit, and the kind of attitude I believe we developers should have towards the CMS. The CMS is wonderful, and I think there’s a lot of benefit to having a CMS that can do EVERYTHING out of the box. Right - it would be great for so many users.
  • #45: But the big problem of course is that we would end up with this hugely bloated piece of code which is just a pain to work with. So the answer is not to just make the CMS do everything that an extension does. There is a time and place for extensions. But hopefully we can collaborate around the idea
  • #46: But the big problem of course is that we would end up with this hugely bloated piece of code which is just a pain to work with. So the answer is not to just make the CMS do everything that an extension does. There is a time and place for extensions. But hopefully we can collaborate around the idea that we should be improving the CMS.
  • #48: So we want to avoid the Jabba The Bloated Hutt problem. But if there are improvements that can be made to the core that actually BELONG in core, then we should be making that core code better as long as it’s possible and meets our other core-level coding requirements. The end result here is to improve as much as possible what we have, which overall should enable us to continue making the core as useful for as many people as possible. Again, we want to make things better but not necessarily throw in the kitchen sink here.
  • #49: The overall point that I’m trying to get across is to think outside the box, be creative with how you use Joomla and find ways to use it that save you time, save you effort, and make it easier for your clients to manage their website. As you approach a project and you’re able to use core do it. If you run into an issue where just some minor changes to the core could make a project go from a third party extension to using pure core, see if you can’t make that change happen. It’ll make the CMS better for all of us using it and you’ll be so much happier when doing an update to that site you were able to use that updater button!
  • #50: So thank you everyone for your time - I hope you learned some things! Final slide -