Hi,
I’m making a fieldtype and trying to load a view inside my display_field() function. The code i’m using to attempt this is the following:
$jeff = $this->EE->load->view(PATH_THIRD.'addon/views/selector_layout');
return $jeff;But i get an error:
Unable to load the requested file: /Applications/MAMP/htdocs/eetest/system/expressionengine/third_party/addon/views/selector_layout.php
The file is in that directory, it’s spelled correctly.
Err..any ideas?
Wasn’t working for me.
I had
return $this->EE->load->view('selector_layout', TRUE);originally, but that didn’t work, so then i looked in other peoples addons and the forums to get some hints and found someone in a forum suggesting
return = $this->EE->load->view(PATH_THIRD.'addon/views/selector_layout');But that didn’t work, so then i looked in safecracker fieldtype which sets the package package path around it. Adding that seemed to work.
Weird stuff.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.