Jump to content

ImportPagesCSV add repeater field support? (got FieldtypePage)


hellomoto
 Share

Recommended Posts

This works for me to support page references in Ryan's ImportPagesCSV.module, in function importPageValue:

elseif($field->type instanceof FieldtypePage) {
            $value = trim($value);
            if(wire("pages")->find("$name=$value")) $page->set($name, $value);
        }

I need to also be able to import repeater fields though.. Anyone know how to do that?

Link to comment
Share on other sites

  • 5 years later...

Good day, @hellomoto !

I seems kind of hard to map arbitrary amount of csv values to repeater item values. I am having hard time imagining how this could be done via GUI. Do you have an idea how this could be done universally UI-wise?

...But it is quite easy to do in a custom script. Looking at a piece of code you presented I am sure you can easily handle this ?.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...