Документация InstantCMS

для администраторов и разработчиков

Инструменты пользователя

Инструменты сайта


en:manual:settings:rewriting

Component URL Substitution

InstantCMS allows to override any component’s URL with the help of the /system/config/remap.php configuration file.

For this purpose, the file should contain the following function:

function remap_controllers(){
}

This function should return an array of values like (Component nameName in URL).

For example, by default the User Profiles component has the /users URL. Correspondingly, the administrator profile address is http://your-site/users/1. For example, you can substitute users by members:

function remap_controllers(){
    return array(
        'users' => 'members',
    );
}

After that the administrator profile URL will look like this: http://your-site/members/1.

A new value may contain cyrillics, though it is not recommended.

You can override several components at a time:

function remap_controllers(){
    return array(
        'users' => 'members',
        'groups' => 'clubs',        
    );
}

Thus, from InstantCMS version 2.4.0 it is possible to override the names of content types.


Back to Site Settings

en/manual/settings/rewriting.txt · Последнее изменение: 25.04.2016 19:18 — murlysja