php - URL management issues in Yii -


Hello, I am having problems in yii management in yii.

I have a model vendor and the second model is the product. Both controllers have an action information now, instead of www.example.com/vendor/info/v-name/abc.html www.example.com/xyz

www.example.com/abc I want to make html my own URL. Instead of .example.com/product/info/p-name/xyz.html

.html parameters are v. Name and P-name are parameters.

I have written

  '& lt; V-name: \ w + & gt; & Gt; The seller / info ',' & lt; P-name: \ w + & gt; '= & Gt; ; 'Product / Information',  

But this does not seem to work as the first rule applies to the case of the product and in the end the exception is thrown. What should be done?

Thanks a lot for help

I use the more general rule I recommend:

'& lt; Controller: \ w + & gt; / & Lt; Action: \ w + & gt; / Name / & lt; Name: \ w + & gt; = & Gt; '& Lt; Controller & gt; / & LT; Action & gt; '

The name attribute will be available in your works:

public function actionInfo () {$ name = Yii :: app ) - & gt; Request-> GetParam ('name', 'default value'); }


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -