I want my url to change from this
/examinations/getchoices/page:2
to this
/examinations/getchoices/item/2
I wonder how to do this. I've already tried changing in the routes.php. I've tried the tutorial in this site . The page content doesn't change when I click prev or next links.
This is what i got in the url
/examinations/getchoices/ 2/ 2
My version of cake is 2.1.
Your help will be much appreciated. I've been stuck with this for 2 days already. Thank you.
You can define custom routes.
http://book.cakephp.org/2.0/en/development/routing.html
eg
Router::connect(
' /examinations/getchoices/item/:number',
array('controller' => 'examinations', 'action' => 'getchoices'),
array('pass' => array('number'))
);
let me know if i can assist you more
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.