Hi everyone,
I have a problem with routing and pagination.
I'm trying to build small catalog of products. To display all products
from "xyz" category I use url:

products/index/xyz

...and this works fine

I wanted my visitors to have nicer URL-s so I put:

Router::connect('/shop/*', array('controller' => 'products', 'action'
=> 'index','cat' => 'xyz'));

into my routes.php and it still works fine.

Problem is that my pagination still takes the old form:

products/index/xyz/page:2/ AND NOT shop/xyz/page:2/

Do you have any ideas how to make paginator to echo shorter URLs as
those that I'm mapping in routes.php ???

NOTE:
Don't thin thak following has anything to do with my problem, still
I'm gonna mention this:
In my model I use custom paginate function that overrides default
pagination so I could perform custom pagination queries like products/
index/xyz/page:2/


function paginate($conditions, $fields, $order, $limit ,$page = 1,
$recursive = null) {

            $params = array(
                  'conditions' => $conditions,
                  'recursive' => $recursive,
                  'fields' => $fields,
                  'order' => $order,
                  'limit' => $limit,
                  'page' => $page
             );

             return $this->find('all', $params);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to