Joomla Rule Engines & MetaTemplate
Upcoming SlideShare
Loading in...5

Joomla Rule Engines & MetaTemplate



This presentation was given at the Joomla & Beyond conference in the Netherlands in May 2011. ...

This presentation was given at the Joomla & Beyond conference in the Netherlands in May 2011.

Watch the video of the complete presentation here:

Note: MetaTemplate Pro has been renamed as "Chameleon" and you can find out more about it at



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Joomla Rule Engines & MetaTemplate Joomla Rule Engines & MetaTemplate Presentation Transcript

  • Joomla Rule Engines
    • and the joy of Meta
    • Stephen Brandon
    • Brandon IT Consulting
    • [email_address]
  • Terms…
    • MetaTemplate & MetaMod
    • Rule Engine
    • Rule Chain
  • In standard Joomla, how do I…
  • … modify output?
  • • plugins act on intermediate or final output
  • … make completely new types of pages?
  • • new component defines new types of pages
  • … alter look and feel of a page?
  • • new template applied to existing page gives it new look & feel • selection of modules on the page • overrides within a template affect HTML output of the component and modules
  • So what’s the problem?
    • different methods required to affect output in different parts of system e.g. plugins, overrides, SEO systems
    • synchronising and ordering different changes based on the same criteria e.g. for logged-in users, change template of this page and remove certain menu items
    • some tasks not available in Joomla e.g. ability to remove individual menu items
  • Actions to script
  • Actions to script (cont.)
  • Case Studies
    • (unfortunately offline; screencast shown in live presentation)
    • use dedicated templates for specific devices (iPhone, iPad)
    • use dedicated template for Facebook embedding
    • ensure visitors exiting Facebook and viewing site normally return to normal template
    Business rules
    • pick up Facebook API key from POST request on first page load
    • “ remember” current context in cookie
    • detect URL parameters to trigger return to normal template
    • device detection
    Cool stuff
    • Google Analytics code:
    • <script type=&quot;text/javascript&quot;>
    • var _gaq = _gaq || [];
    • _gaq.push(['_setAccount', 'UA-5246969-1']); // <== put your GA code here
    • _gaq.push(['_setCustomVar',
    • 1,
    • 'Template',
    • 'ElectricStandard2011' // <== customise here for each template
    • ]);
    • <?php
    • $session =& JFactory::getSession();
    • $info_string = $session->get( 'InfoString', '', 'metatemplate');
    • if ($info_string != '') {
    • echo &quot;_gaq.push(['_setCustomVar',&quot;;
    • echo &quot;2,&quot;;
    • echo &quot;'InfoString',&quot;;
    • echo &quot;'$info_string'&quot;;
    • echo &quot;]);&quot;;
    • }
    • ?>
    • _gaq.push(['_trackPageview']);
    • (function() {
    • var ga = document.createElement('script');
    • ga.type = 'text/javascript'; ga.async = true;
    • ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    • var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    • })();
    • </script>
  • Alexandre Therrien <>
    • Selling online, private, and correspondence guitar tuition
    • Providing a marketing platform for guitar teachers to connect to prospective students
  • Business Rules
    • Determine what people are looking for, using any available clues e.g. Google search query, landing page for campaigns, GeoIP country of origin, language etc.
    • Use appropriate templates and modules to support that theme e.g. girls/women, metal, electric, Indonesia etc.
    • Track conversions in Analytics, noting the template used
  • Cool stuff
    • detect search terms in Google referrer string e.g. “metal”; match to template
    • GeoIP and language detection; country/language specific templates & modules
    • template choices are “sticky”
    • RSForm includes info from MetaTemplate in contact e-mails
    • Google Analytics tracks template and conversion information
    • Demo
  • Opportunity
    • Seeking a marketing partner in NL/Europe with interest in music; strong marketing skills
    • Contact Alexandre Therrien <>
    • GEL sells and implements Local Listing Management for small businesses e.g. Google Places, Yelp, Yellowpages, etc
    • Affiliate program is used to match clients to a local affiliate
    • Site is branded according to local affiliate
  • Business Rules
    • Affiliate programme brands the site to a local affiliate, once site identifies location of visitor via GeoIP, zip code (form) or URL
    • Branding includes banners, logos, contact numbers, pricing, live chat, menu items etc.
    • Once determined, Affiliate–customer link is permanent
    • some basic form processing handled in MetaTemplate; can be done on any URL
    • affiliate links create permanent linkage, while zip code changes can change affiliate
    • GeoIP for zip codes; removing/hiding menu items for some users
    • Getting info from AEC
    Cool stuff
    • Demo and use zip codes: 95008, 94203, or 93401
    • (clear cookies...)