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.
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.
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
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.
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.
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