Question

In Yii crud, I've setup a Model, View, and Controller based on my db table called Form. I've modified the controller and views to my liking thus far:

index.php/form/all (index)
index.php/form/new (create)
index.php/form/2 (view)
index.php/form/2/edit (edit)
index.php/form/2/delete (delete)

Now I'd like to setup some subpages that will be dynamic. The url patterns are below. How do I set this up inside of the FormController.php?

index.php/form/2/fields/all
index.php/form/2/fields/new
index.php/form/2/fields/1/edit
index.php/form/2/fields/1/delete

BTW - Fields is a separate db table with a separate yii model. Though I'd like to not create a controller for it if I don't need to.

Était-ce utile?

La solution

Thanks Neophile, I ended up adding a fields controller. Here is a link to my finished solution: Yii URLManager rule for multiple controller action parameters

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top