I want to know how to use an action name as a parameter ‘cause i want my URL like this pattern:’/item/[item_number]’ where ‘item_number’ can be used as a parameter so that i can access database with this number.
Any one who can help me? THKS!
I want to know how to use an action name as a parameter ‘cause i want my URL like this pattern:’/item/[item_number]’ where ‘item_number’ can be used as a parameter so that i can access database with this number.
Any one who can help me? THKS!
I found the function ‘createAction()’, but i don’t know how to use it.
public function actionCreate($category, $language='en')
{
$category=(int)$category;
}
what should i write after that $category line to make the effect like
return array(
'edit'=>'application.controllers.post.UpdateAction',
);
in ‘actions’ function? How can i change ‘edit’ to $category?
No one knows about this?
Using the createAction doesn’t work, cause it can only get parameters from Get[’$’].
What i really need is changing the Action name to what the user inputs but those ‘actions’ will all use one real action.
I think it’s an url problem, and we can solve it by changing CUrlManager. The question is how …
I think you can get what you want just by configuring the urlManager, with your [item_number] being remained as a GET parameter to a certain action.
Take a look at the guide. URL management