joomla rule engines & metatemplate

Post on 21-Oct-2014

1.521 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

This presentation was given at the Joomla & Beyond conference in the Netherlands in May 2011. Watch the video of the complete presentation here: http://vimeo.com/24568855 Note: MetaTemplate Pro has been renamed as "Chameleon" and you can find out more about it at http://www.metamodpro.com/chameleon

TRANSCRIPT

Joomla Rule Engines

and the joy of Meta

Stephen BrandonBrandon IT Consulting

stephen@brandonitconsulting.co.uk

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 systeme.g. plugins, overrides, SEO systems

•synchronising and ordering different changes based on the same criteriae.g. for logged-in users, change template of this page and remove certain menu items

•some tasks not available in Joomlae.g. ability to remove individual menu items

Actions to script

Actions to script (cont.)

Case Studies

iContes.com

(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 rulesicontes.com

•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 stufficontes.com

Google Analytics code:<script type="text/javascript">

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 "_gaq.push(['_setCustomVar',";

echo "2,";

echo "'InfoString',";

echo "'$info_string'";

echo "]);";

}

?>

_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') + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

})();

</script>

Alexandre Therrien <info@quebecguitare.com>

•Selling online, private, and correspondence guitar tuition

•Providing a marketing platform for guitar teachers to connect to prospective students

Businessquebecguitar.com

Business Rulesquebecguitar.com

•Determine what people are looking for, using any available cluese.g. Google search query, landing page for campaigns, GeoIP country of origin, language etc.

•Use appropriate templates and modules to support that themee.g. girls/women, metal, electric, Indonesia etc.

•Track conversions in Analytics, noting the template used

Cool stuffquebecguitar.com

•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

Opportunityquebecguitar.com

•Seeking a marketing partner in NL/Europe with interest in music; strong marketing skills

• Contact Alexandre Therrien <info@quebecguitare.com>

GrowthEngineLocal.com

•GEL sells and implements Local Listing Management for small businessese.g. Google Places, Yelp, Yellowpages, etc

•Affiliate program is used to match clients to a local affiliate

•Site is branded according to local affiliate

BusinessGrowthEngineLocal.com

Business RulesGrowthEngineLocal.com

•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 stuffGrowthEngineLocal.com

•Demo

http://growthenginelocal.comand use zip codes: 95008, 94203, or 93401

• http://growthenginelocal.com/?affiliate=1(clear cookies...)http://growthenginelocal.com/?affiliate=2

top related