Hey Greg,
First of all, thanks for getting in-touch.
Essentially…
I have {weblog:entries} tag for podcasts (called Podcasts) that contain a custom field for a URL to the podcast’s MP3 (on an Amazon S3 bucket). These weblog entries have two statuses, EJC & FC. I need to loop through the Podcasts weblog entries twice (one for each status) and grab the URL to the MP3 and put them into a PHP array. The result needs to be passed as a variable in an embed tag so it can be used by another template (specifically, a Javascript template that powers a media player). I have confirmed the player to work by hard-coding the result of the array directly into the Javascript template.
I would normally use a {weblog:entries} tag, but the PHP parsing order is getting in the way:
If I set to input, the weblog entries won’t output the content to populate the array before the PHP initializes.
If I set to output, the variable in the embed tag will be rendered as NULL before the PHP array gets populated.
The solution in my head is to set the parsing order to “input” and to replicate the {weblog:entries} tag in PHP/MySQL, but I’m having trouble getting the desired result.
Does that make more sense?
—Nick