dudapiotr / ZfTable

*Not supported*ZfTable 3.1. Awesome ZF2 table / grid (and much much more) generator with huge possibilities of decorating and conditioning. Integrated with DataTables, Doctrine 2, Bootstrap 2.0 and 3.0.
http://dudapiotrek.laohost.net/
MIT License
75 stars 59 forks source link

route like this is not working :http://zf2-tutorial.localhost/en-US/table/base #20

Closed excennfahnfah1976 closed 10 years ago

excennfahnfah1976 commented 10 years ago

Hallo, I have a question: i use translation in my application and this is the route: http://zf2-tutorial.localhost/en-US/table/base when i use this url i can see the zftable with customer data but i can not navigate.

but when i disable translation and use this url: "http://zf2-tutorial.localhost/en-US/table/base" then it work properly.

what can i do to use translation with this route (http://zf2-tutorial.localhost/en-US/table/base) ?

Thank you

dudapiotr commented 10 years ago

What do You mean navigate doesnt work ?

There is only one place where You paste url to JQuery plugin (look at phtml file).

<script>
    $("#tableContainer").zfTable('/table/ajax-base');
</script>
excennfahnfah1976 commented 10 years ago

I think i have problems with routes because this url is workin "http://zf2-tutorial.localhost/table/base" and this is not working "http://zf2-tutorial.localhost/en-US/table/base". Do you have an idee why? Should I change the route? Thank you

dudapiotr commented 10 years ago

Look at ZfTable/config/module.config.php. There You have to change Your routing. Currently it looks like below;

'zftable'=> array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/table[/][:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        'controller' => 'ZfTable\Controller\Table',
                        'action'     => 'index',
                    ),
                ),
            ),