Hello
I am having a little problem with a nested snippet call on my Modx site. I have a snippet that checks if the site is been access though Facebook or not.
<?php
$output = '';
if($_SERVER['HTTP_HOST']=='apps.howirritating.com') {
$output = $if;
} else {
$output = $else;
}
return $output;
?>
Which works fine unless the ’if’ or ’else’ variable contain a snippet call with parameters. I seems to treat the first back tick in the snippet call as the end of the variable.
This is my call or one of the problem, this calls a different form depending on where it is requested from. (if_facebook)
[[if_facebook? &if=`Call Facebook Form`&else=`[!eForm? &formid=`AddForm` &subject=`New Addition` &to=`[email protected]` &tpl=`AddForm` &report=`AddFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`AddStyles` &vericode=`1` &gotoid=`46` !]`]]
This will output "Call Facebook Form" when accessed from Facebook but only outputs "[!eForm? " when accessed normally.
Is there away the back ticks can be escaped or does anyone know of a way I could work around this problem?
Thanks in advance
Ian