1

I am trying to ingest an iTunes compatible RSS feed on the template with FeedMe... the enclosures have things like <itunes:description> in them. When I try and access these properties I get the following error:

Unexpected token "punctuation" of value ":" ("end of print statement" expected).

Anyone know how I can access these enclosures without creating a Twig error?

Example current Twig code:

{{ feed[0].itunes:image['@href'] }}
2

You can’t use dot syntax because of the colon, try this instead

{{ feed[0]['itunes:image']['@href'] }}

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.