HOW TO define default controller and action for application?

Discuss everything related to ApPHP Durecty CMF. All versions. Any questions related to the Directy CMF developing or using should be posted to this forum.

Moderators: alexandrleonenko, alexmst

administrator
Site Admin
Site Admin
Posts: 6169
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO define default controller and action for application?

Postby administrator » Mar 11th, '15, 19:40

To define default controller and action (start page) for application you have to define them in protected/config/main.php:

Code: Select all

<?php
return array(
    // default settings
    'defaultController' => 'pages',
    'defaultAction' => 'view',
);


or redefine it in module [module-name]/config/[module-name].php file using the same syntax:

Code: Select all

<?php
return array(
    // default settings (optional, if defined - will be used as application default settings)
    'defaultController' => 'Posts',
    'defaultAction' => 'viewAll',
);

Return to “ApPHP Directy CMF {developers/users}”