M
M
makkartnis2014-03-09 19:11:15
Kohana
makkartnis, 2014-03-09 19:11:15

How to fix Kohana 3.2 routing issue for cnc?

A route of this kind does not pass:

Route::set('salon','salon/<link>-<id>')
    ->defaults(array(
        'directory' => 'pages',
        'controller' => 'salon',
        'action' => 'index',
    ));

And here is such a buzz:
Route::set('salon','salon/<link>')
    ->defaults(array(
        'directory' => 'pages',
        'controller' => 'salon',
        'action' => 'index',
    ));

Tell me how to solve

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2014-03-10
@rdifb0

And what Request URI if not a secret? Try to specify parameters, for example:

Route::set('salon','salon/<link>-<id>', array('link'=>'[a-z]+', 'id'=>'[0-9]+'))
    ->defaults(array(
        'directory' => 'pages',
        'controller' => 'salon',
        'action' => 'index',
    ));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question