Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Theme Support for frontend

I am learning new for MVC and PHP Phalcon Framework.

I want, theme engine in my project. What is the best way for theme support ? I have 2 module in my project, "frontend","backend"

folder structure




for frontend;




for backend;



what should I do for theme supporting ?

thanks for helping.



I belive you can achive that using a depency injection and setViewsDir() according to your themes, if i understand the documentation correctly (

Something like:

  $di->set('view', function() {

     //read your "theme" value before, assume that $heme_name variable contains your theme's directory name AKA theme name.
      $view->setViewsDir("../app/views/" . $theme_name);

I have not tried this but i belive it should work fine :)