0

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.

Jeffrey
  • 4,098
  • 11
  • 42
  • 66
  • you need to create fields controller and then modify the url rules in the application configuration – Neophile Aug 22 '13 at 06:53
  • just to be clear... you're suggesting that I setup a Fields controller and the pass the form id variable as one of the variables? Basically, working right to left on the url chain. – Jeffrey Aug 22 '13 at 17:24

1 Answers1

0

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

Community
  • 1
  • 1
Jeffrey
  • 4,098
  • 11
  • 42
  • 66