Published by Mijingo

tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Using view files in custom extensions

  • Posted by Jason Ferrell
  • November 11, 2009

With EE 1.6.8, we now have the ability to use view files in modules and that’s great news for add-on developers. Recently I wanted to use view files for an extension I was developing, but the EE docs do not list a way to do that. Specifically, I wanted to use view files for the extension settings form and for the contents of the publish tab for the extension. Here’s a snippet of how to use view files in a custom extension:

$DSP->body .= $DSP->view(PATH_EXT.'ext_widget/ext_settings.php'$varsTRUE); 

I created a folder called ext_widget to hold my view files, keeping the view file separated from other extension files.