4

その下にアイテムのリストを表示するカテゴリのリストがあります。

したがって:

ルートには次のものがあります。

Router::connect('/category/:slug', array('controller' => 'Product',
             'action'=>'catview', 'slug'=> '[0-9a-zA-Z]+'));
Router::connect('/category/:slug/:page', array('controller' => 'Product',
             'action'=>'catview','slug'=> '[0-9a-zA-Z]+','page'=>'[0-9]+'));

結果ページでこれを行うと、うまくいきません:

<?php 
        $slug = $this->params['slug'];
        $this->Paginator->options(array('url'=> array('controller' => 'Product',
                             'action'=>'catview','slug'=> $slug)));

        echo $this->Paginator->prev('<< Show me previous', array('class'=>'prev'))
        . $this->Paginator->next('Show me more >>', array('class'=>'next')); ?>

結果は変わりません。1 ページ目と同じ結果が表示されます。

私が間違っているアイデアはありますか?

4

1 に答える 1