CPagination problem




   'urlManager'=>array(

            'urlFormat'=>'path',

            'showScriptName'=>false,

            'rules'=>array(

                '<controller:\w+>/<action:\w+>/<id:\d+>/<type:\w+>/<page:\d+>'=> '<controller>/<action>',

                '<controller:\w+>/<action:\w+>/<id:\d+>/<type:\w+>'=>'<controller>/<action>',

                '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

            ),

        ),



I got these links - domain.com/album/photos/page/2domain.com/album/photos/page/N for URL like domain.com/album/photos. Everything work correctly.

But for URL like domain.com/album/view/{ALBUM_ID}/photo I got some garbage at the end of each link - domain.com/album/view/{ALBUM_ID}/photo/2?{ALBUM_ID}=photo, and domain.com/album/view/{ALBUM_ID}/photo/3?{ALBUM_ID}=photo&2%3F{ALBUM_ID}%3Dphoto= at 2nd page.

Looks like I missed something at urlManager rules. Any help is appreciated.

Hi,

maybe you are using album_id instead of id to create link?




array('album/view', 'album_id'=>2); // ?