Modifying A Template (Php File) Using The Web Browser

Hello all,

The admin user of the website I am making needs to be able to modify template files (like for example email templates). These files are currently stored in the protected/views/emails folder and are called using the render partial yii function.

I would know how to do this if those templates where stored in the database, but what if I want the user to modify the php template file?

pretty same - instead of loading from database you load file contents, and when saving - update the file. Just be careful with user privileges and with action that fetches file content to only allow access files in single folder (or you will end up with pretty big security hole)

@nkd check this post out might help you get better understanding