We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

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.

Modular structure / Модульная структура

Hello everyone

I had worked with ImageCMS (CodeIgniter), and I was comfortable modular structure.

Accordingly, the URL looks like this:

site.loc / frontend

site.loc / backend

The model applies only to this module. View only contains files named .phtml Action (), without the folder name of the controller. File templates / main.phtml contains the basic layout of the site.

<!DOCTYPE html>
<html>
    <head>
        <title>Phalcon PHP Framework</title>
    </head>
    <body>
        <?php echo $this->getContent(); ?>
    </body>
</html>

Is it possible to implement such structure? Is it possible to play it with the help of scaffolding?


Всем привет

Я долгое время работал с ImageCMS (CodeIgniter), и мне удобна модульная структура.

Соответственно URL выглядят так:

site.loc/frontend site.loc/backend

Модель относится только к этому модулю. View содержит только файлы .phtml с именем Action(), без папки названия контроллера. Файл templates/main.phtml содержит основной макет сайта.

<!DOCTYPE html>
<html>
    <head>
        <title>Phalcon PHP Framework</title>
    </head>
    <body>
        <?php echo $this->getContent(); ?>
    </body>
</html>

Можно ли реализовать такую структуру? Возможно ли воспроизводить её с помощью scaffolding?



5.2k
Accepted
answer

Yet another example with module structure https://github.com/ovr/phalcon-module-skeleton