craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
289 stars 139 forks source link

Entry with Assets Field, that allows multiple files - only allows one file #671

Closed cruiser12 closed 1 year ago

cruiser12 commented 4 years ago

Description

My Entry has an Assets Field, that allows multiple assets/files like a gallery. My XML files show multiple sub-nodes (n0,n1,n2, etc), but i cannot address them. Only by selecting the e.g. n0/node_export_file_url i can import only the first image of the gallery. Is there a solution for it?

Bildschirmfoto 2020-02-16 um 04 22 06

latest Craft 3.4

jdsdev commented 4 years ago

I'm not one of the developers, but it looks like you just need to give all of your sub-nodes the same name, as in the docs: https://docs.craftcms.com/feed-me/v4/guides/importing-assets.html

<?xml version="1.0" encoding="UTF-8"?>
<Images>
    <Image>
        <Title>Feed Me Social Card</Title>
        <URL>https://craftcms.com/uploads/plugins/feed-me/_800x455_crop_center-center_none/feed-me-social-card.png</URL>
        <Caption>Some Caption</Caption>
    </Image>

    <Image>
        <Title>Craft Commerce Social Card</Title>
        <URL>https://craftcms.com/uploads/plugins/commerce/_800x455_crop_center-center_none/commerce-social-card.png</URL>
        <Caption>Another Caption</Caption>
    </Image>
</Images>

I've done a similar import using JSON and not had any issues.