Hello everyone!
I want to hide the admin URL to users, so I set the following router
$router->add('my_admin_url/:controller/:action/:params', array(
'namespace' => 'MY\Controllers\Admin',
'controller' => 1,
'action' => 2,
'params' => 3,
));
And I can visit the backend properly by : https://localhost/mysite/my_admin_url/posts/list
But how to code in the *.volt
of the backend viewer? for example, in the post viewer, {{ url("posts/list") }}
will generate the HTML mysite/posts/list
, BUT NOT my expect: mysite/my_admin_url/posts/list
!
How to generate the url automaticly with some prefix (like my_admin_url
)? or how to hide the admin url? Can I override the VOLT function url
?