1

For an EE3 site, I'd like to split a CSV or pipe delimited string (i.e. avi,david,sam or maybe avi|david|sam) and have each segment added to a Stash list.

I've looked at BBD Stringer ($6) on Devot-ee thinking I might be able to use it to break up the string and then stash each value in a list but it seems to be a bit more basic: that it just breaks the string apart but not as tags which could be passed into an {exp:stash:set_list} tag pair.

Any thoughts?

1

Haven't used BBD Stringer, but have used Low List to help with this. You can do something like:

{exp:stash:set_list
    name="XXX" 
    parse_tags="yes"
}
    {exp:low_list:each items="north|east|south|west" as="individual_direction"}
        {stash:direction}{individual_direction}{/stash:direction}
    {/exp:low_list:each}
{/exp:stash:set_list}

By the way, MANY thanks to Croxton & Low (attorneys?) for both add-ons.

1
  • Went a different direction in terms of handling this data but this answer would have definitely gotten me where I needed to be. Bookmarked for future use. Thanks! Sep 16 '17 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.