Skip to content

Instantly share code, notes, and snippets.

@thisisjamessmith
Created October 15, 2013 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thisisjamessmith/18d85e978b714aaf2eef to your computer and use it in GitHub Desktop.
Save thisisjamessmith/18d85e978b714aaf2eef to your computer and use it in GitHub Desktop.
{!-- =========================================
this set_list tag stores the full original XXXXX
feed into nicely accessible Stash vars.
==========================================--}
{exp:stash:set_list
name="all-performances"
save="yes"
replace="no"
scope="site"
trim="yes"
parse_tags="yes"
}
{exp:ajw_feedparser
url="https:XXXXX"
itempath="/xml/Performance"
parse="inward"
}
{stash:perf-id}{@ID}{/stash:perf-id}
{stash:prog-id}{@ProgrammeID}{/stash:prog-id}
{stash:start-day}{@StartDate}{/stash:start-day}
{stash:start-date}{@StartDate} {@StartTime}{/stash:start-date}
{stash:start-time}{@StartTime}{/stash:start-time}
{stash:notes}{@Notes}{/stash:notes}
{/exp:ajw_feedparser}
{/exp:stash:set_list}
{!-- =========================================
this stash:append tag pulls out a pipe-separated
list of all the programme-ids supplied by the
full feed above, which are then fed into
a standard EE channel:entries tag.
==========================================--}
{exp:stash:append name="prog-ids" parse_tags="yes" trim="yes"}
{exp:stash:get_list name="all-performances" orderby="start-day" sort_type="integer"}
|{prog-id}
{/exp:stash:get_list}
{/exp:stash:append}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment