Problem with structurefield in a onepager

Hi,
I have an onepage website based on this tutorial: http://getkirby.com/docs/solutions/one-pager
Now I have an problem to parse a structurefield.
If I call it width
$inquirys = yaml($data->inquiry());
I got the error message "Fatal error: Call to a member function inquiry() on a non-object in …"
With $inquirys = yaml($page->inquiry()); I get no output but the website will work without showing the structurefield data.
If I use a::show($inquirys) here I got an empty array.

Could someone tell me what Object I have to use to get an structurefield output in this case?

Kind regards,
Jan

I could be wrong here but would you not instead use something like

$inquiries = $page->inquiry()->toStructure()

to retrieve the data as an array? In the first instance of

$inquirys = yaml($data->inquiry());

it sounds like $data either doesn’t exist or isn’t an object.

http://getkirby.com/docs/cheatsheet/field-methods/toStructure

and it gives an object not an array. Although in this instance

http://getkirby.com/docs/cheatsheet/field-methods/yaml

it would again be similar

$inquiries = $page->inquiry()->yaml()

It looks like you aren’t passing the section to the snippet so $data is not set to the page you want to use.

@lukasbestle:
$data works I think. because everything else in this section is rendered correctly but not the structurefield.
As example with $data->image('background.jpg') I got displayed the backgroundimage from the correct section.

Could you please post the code around the line where the error occurs? The full error including the file and line where the error occurred will also help.

Okay guys, I do a basicly mistake. It is the structure field with the selector Plugin:

EDIT: I searched out that I used a old version of that plugin. the new version 1.5 works as it should.
Sorry for that and thank you very much for your help!