1
votes

Here i want to do. User can upload his/her template like wordpress. So the controller would load depend on what template they selected.

Here my simple folder structure

/app/webroot/files/ <--- all template goes here. The ext is .ctp

I tried using

render( $action = NULL, $layout = NULL, $file = NULL )

which $file is file that i will use. But this method cannot load file outside view folder. Tried using '/' but only go to 'app/view/' so i cannot go to 'app/webroot/'

I think about 2 solution:

  1. Upload template file to webroot and render the .ctp on webroot that user uploaded
  2. Upload template file to view folder but i cannot upload to that folder too

So how to solve this???

help me

1

1 Answers

0
votes

You could define an additional view path in app/config/bootstrap.php.