Print

Using Joomla Plugins with F2C (Smarty) templates

Anyone with some Joomla experience will have noticed that the curly brackets {} used by Smarty are also used by many (3rd party) Joomla Plugins. And YES, this does create a CONFLICT.

BUT THERE IS AN EASY SOLUTION ( actually two solutions)

Using alternatives for { and } symbols

Instead of using the curly brackets use the following

{ becomes =  {ldelim}
} becomes = {rdelim}

Example: Google Map plugin by Mike Reumer and F2C Geo Coder field type named ADDRESS.

{ldelim}mosmap lat='{$ADDRESS_LAT}'|lon='{$ADDRESS_LON}'|text='{$ADDRESS_ADDRESS}'
|tooltip='{$JOOMLA_TITLE}'|marker='1'|align='center'{rdelim}

Wil generate the following in your Joomla article if "Ceresstraat 24, 4811 Breda, The Netherland" is filled out as address in the F2C submission form.

 {mosmap  lat='37.0625'|lon='-95.677068'|text='Ceresstraat 24, 4811 Breda, The Netherlands'
|tooltip='My test article'|marker='1'|align='center'}
 

Always make sure that if you copy/paste code you remove any
tags or spaces for the code to work properly!

More info: http://www.smarty.net/manual/en/language.function.ldelim.php

Block escaping code in Smarty

It is also possible to escape blocks of code. In other words, not replace individual {} symbols but telling Smarty not to do anything with the code between the tags. The term they use is 'literal', i.e. render the literal code.

Take note: If you have variables ( {$VARIABLE_NAME} ) within a block they will NOT be rendered.

{literal} ... any code including {} tags ....  {/literal}

More information: http://www.smarty.net/manual/en/language.function.literal.php

Form2Content no longer provides documentation for patTemplate use. All examples use Smarty templating! Old patTemplate templates are backwards compatible in Joomla 1.5 but new features have not been added.