I posted a question several days ago which has not had any replies as yet. I now have another question.
Context: I have created my own custom module which works great EXCEPT that certain EE functions do not work within the tag pairs.
The first problem I encountered was that “embed” statemetns do not work AT ALL:
{exp:cg_industry_data:vddu erec_id="{segment_3}"}
{embed="search/vehicle-details-dealer-used"}
{/exp:cg_industry_data:vddu}
The second problem I encountered was that control panel global variables return void, eg:
{exp:cg_industry_data:vddu erec_id="{segment_3}"}
<div>{my_global_var}</div>
{/exp:cg_industry_data:vddu}
If anyone can provide any guidance or assistance in this matter I would be eternally grateful as I have an urgent deadline ahead.
Yours in desperation (: Hereward
foreach ($TMPL->var_single as $key => $val) {
$xml_key = strtoupper($key);
$new_val = '';
if ($this->xml_key_exists($xml_obj, $xml_key)) {
$testval = $this->xml_val($xml_obj, $xml_key);
$new_val = ($testval) ? $testval : '[empty]';
}
else {
$new_val = '';
}
$count++;
$tagdata = $TMPL->swap_var_single($val, "$new_val", $tagdata);
}
return $tagdata;
One thing that can happen is: your module is converting the { and } to html entities & #123; & #125; Convert them back before sending the output back. You can use EE constants LD and RD.P.S. remove the space from “& #123;” (EE forum converts them)str_replace(array('& #123;','& #125;'), array(LD,RD), $data); return $data;
Thanks for the suggestion - unfortunately it did not work. Any embed statement within my custom module tags is ignored as if it did not exist - but there are no errors either.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.