tips icon image

EE Insider Tips
Sponsored by EE Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Using view files in custom extensions

User's avatar
  • Posted by Jason Ferrell
  • November 11, 2009
  • 2 people have found this tip helpful.

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.

Add Your Comment?

You must have an EE Insider account to post comments on Insider Tips. It's fast, easy and hassle-free.

Sign up now (or login).

Search EE Insider Tips
Sponsored By