I have created a module which using curl retrieves and parses data from an external source. I have adapted the code from channel:entries so it outputs the correct values. The method handles the tags and chunks in the same way as it would a category.
{exp:sh_dictionary:translate_result dictionary="wordreference"}
{additional}
{exp:stash:append_list name="additional_{count}"}
{stash:sense}{sense}{/stash:sense}
{stash:pos}{POS}{/stash:pos}
{stash:translation}{translation}{/stash:translation}
{/exp:stash:append_list}
{/additional}
{compound}
{exp:stash:append_list name="compound_{count}"}
{stash:sense}{sense}{/stash:sense}
{stash:pos}{POS}{/stash:pos}
{stash:translation}{translation}{/stash:translation}
{/exp:stash:append_list}
{/compound}
{/exp:sh_dictionary:translate_result}
The problem is if I have just the {additional} chunk I get the result I want. And similarly if I just include the {compound} chunk. But if I include them both I get nothing.
Do I need to clear something before setting up a new list? or maybe it is the way my module parses the data. If I wrap each chunk in its own {exp:sh_dictionary:translate_result} it solves the problem but this doesn't feel right as I would need to cache the original curl results.
Thanks