I have in the database recursive data, that means container containing other container and/or normal data to output. What is the best way to organize my controller and volt files to handle this?
Each container should be a <div class="container-###"> with its content. Content could be other container again with its own content and so on.
There are different containers, so different html templates should be used. The information about the template is also stored in the DB, so I could use $this->view->pick() to select the corresponding .volt file.
I have the class ContentController::viewAction which shows me one container. I have already logic for recursion, but I'm not sure where to put it, to have everything right.