0

I'm using the Feed Me plugin in a template to extract data from an RSS feed.

So if the RSS contains the following snippet

<category>Physiology</category>
<pubDate>Mon, 02 Nov 2015 00:00:00 +1100</pubDate>
<dc:creator>Joe Bloggs</dc:creator>

I can extract the data for the first two nodes using {{ node.category }} or {{ node.pubDate }}. But for the third {{ node.creator }} doesn't work and {{ node.dc:creator }} results in an error.

What is the correct way to extract node data that has a namespace defined?

2

As the example actually shows, you'd reference these sort of nodes using the array notation.

{{ node['dc:creator'] }}
  • Indeed it does - I guess I didn't understand what that was even though it seems obvious now :) Thank you @crawf – Jack McKenzie Dec 14 '15 at 4:23
  • No worries - its a little hidden away in the example :) – crawf Dec 14 '15 at 8:57

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.