Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    Hi all.

    I have controller "page" and action "messages".
    If it have no id - it shows all themes for messages, if id is set - it shows messages for current theme. But paginator works wrong: for route /page/messages/10 it create next link /page/message/?page=2 (and etc.). How make right links for paginator (such as /page/messages/10/?page=2).

    Sorry for bad English ;)
    • CommentAuthorThijs

    .. and the action showing messages belonging to a theme is not the default index of listing action, right?

    Then I guess you should add an extra line to your routes.php
    (before the existing lines of course)

    $Map->connect('/message/:theme', array(
    'controller' => 'message', 
    'action' => 'by_theme')

    I'm not sure, but it might need a COMPULSORY parameter, like:

    $Map->connect('/message/:theme', array(
    'controller' => 'message', 
    'action' => 'by_theme',
    'theme' => COMPULSORY
    Tnxs for answer, but I find other way :)

    I override method defaultUrlOptions() of controller:

    function defaultUrlOptions($options)
    return array('id' => $this->params['id']);

    Now it work but...
    $this->topic_pages = $this->pagination_helper->getPaginator($this->Message, array("items_per_page" => 20));
    return pagination links for all record (if I think rightly) but I need only for some records, by conditions. How I can get pagination with conditions?

    I Found solution here