Jump to content

How to iterate through repeater fields' subfields?


Recommended Posts

I know that say I have a repeater field engines, I can do foreach($page->engines) or $page->engine_field... but is there any way to do like

foreach($page->engines as $e) {
    foreach($e->field as $field) {
        echo $field->val;

That itself doesn't work. But is there some way of iterating through a repeater field's subfields? I'm trying to add repeater field support to Import Pages CSV module... If not I may just have to figure out how to write a separate module specifically for imports of a particular page template... if I can... I can try...

Anybody know about 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

  • Create New...