Closed yannickvid closed 9 years ago
This may not be the best way to do it, but at least it solves the issue:
Instead of doing the requests by calling: $("#tableContainer").zfTable('/admin/members/ajax-list');
You need to call the full URL with the locale: $("#tableContainer").zfTable('<?php echo "http://" . $_SERVER['SERVER_NAME']; ?>/en/admin/members/ajax-list');
As suggested by juriansluiman on his module page, it will be better to use ZF2 View Helpers like so:
$("#tableContainer").zfTable('<?php echo $this->url('admin-members', array('action' => 'ajax-list'), array('force_canonical' => true))?>');
Please note that you need the "array('force_canonical' => true)" to display the full URL, otherwise it will not work.
When using Zftable and SlmLocale (https://github.com/juriansluiman/SlmLocale) with the strategy "uripath", the table is displayed properly but it is not possible to use the filters. It looks like the Ajax request always return the whole table.
The module SlmLocale is used to detect the locale of a project. The UriPath strategy add the locale at the beginning of the URL. Ex: "myproject.com/page1" will become "myproject.com/en/page1". When I deactivate the UriPath strategy, Zftable is working properly.
Has anyone tried to work with both these modules at the same time?