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

Nested Plugins

Development and Programming

Milaan's avatar
Milaan
33 posts
16 years ago
Milaan's avatar Milaan

Hello!

I have a plugin which collects data from two XML Files which are available on a remote http webseite.

The first remote file is a list of members of our community The second file is the personal date for one member.

What i want to do is the following: 1.) I first want to get a complate list of all members and display them on my homepage 2.) In each row of my table i want to get the member details for each member.

{exp:armory:guild server="xyz" guild="abc"}
<tr>
    <td>{guild_member_name}</td>

    {exp:armory:character server="xyz" character="{guild_member_name}"}
    <td>{member_gender}</td>
    <td>{member_location}</td>
    <td>{member_age}</td>
    {/exp:armory:character}

</tr>
{/exp:armory:guild}

Now this was not working. It worked when i set the parameter character=”Joe” static, but not with character=”{guild_member_name}”. Also if i dont nest, both are working just fine.

I found out that there is a parameter parse=”inward” to parse the outer code first but when i add this parameter to {exp:armory:guild} i just get a blank webpage.

       
Milaan's avatar
Milaan
33 posts
16 years ago
Milaan's avatar Milaan

Another Addition… heres my Plugin Code:

class Armory {

    function Character() {
        global $TMPL;

        $server = $TMPL->fetch_param('server');
        $character = $TMPL->fetch_param('character');

        // Here i do some remote XML Collecting

        $tagdata = $TMPL->tagdata;

        foreach ($TMPL->var_single as $v) {
            if ($v == 'armory_name') $tagdata = $TMPL->swap_var_single($v, RESULTFROMXMLFILE, $tagdata);
            ...
            ...
            ...
        }
    }

    function Guild() {
        global $TMPL;

        $server = $TMPL->fetch_param('server');
        $guild = $TMPL->fetch_param('guild');

        $tagdata = $TMPL->tagdata;

        for (......) {
            $tagdata = $TMPL->swap_var_single('gender', RESULTFROMXMLFILE, $tagdata);
            ...
            ...
            ...
        }
    }

}
       
Milaan's avatar
Milaan
33 posts
16 years ago
Milaan's avatar Milaan

Anyone who can help me here?

       
Derek Jones's avatar
Derek Jones
7,561 posts
16 years ago
Derek Jones's avatar Derek Jones

If you get a blank page, it’s generally an indication of hidden PHP errors. Turn error reporting on, make sure display_errors is enabled in your PHP environment, and give it another go. “Inward” parsing is exactly what you need for this type of situation. An alternative would be to make the character details a variable pair of your guild() method, similar to the categories variable pair of the weblog entries tag. Either way, you need to get error reporting on to reveal the issue.

       

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.