We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Begging on My Hands and Knees for Help

Development and Programming

hereward's avatar
hereward
91 posts
17 years ago
hereward's avatar hereward

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

       
hereward's avatar
hereward
91 posts
17 years ago
hereward's avatar hereward

I understand from researching that tag variables will simply override global variables. But how do I prevent this from occuring?

I am still looking for a solutin to the embed problem. Any ideas out there?

       
hereward's avatar
hereward
91 posts
17 years ago
hereward's avatar hereward

After 3 weeks not one single reply.

Is Expression Engine still alive? Hello? Is there anybody out there?

       
Justin Hurlburt's avatar
Justin Hurlburt
344 posts
17 years ago
Justin Hurlburt's avatar Justin Hurlburt

Greetings!

May I ask that you post your variable parsing code? I believe this will give us a bit more information on what’s happening. =)

       
hereward's avatar
hereward
91 posts
17 years ago
hereward's avatar 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;
       
hereward's avatar
hereward
91 posts
17 years ago
hereward's avatar hereward
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.
str_replace(array('& #123;','& #125;'), array(LD,RD), $data);

return $data;
P.S. remove the space from “& #123;” (EE forum converts them)

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.