Yii Themes Go Against Dry

According to the Yii guide when you create a theme you need to have Views under that theme for your controller to use. I have a module with Views, module/views/login, but if I want a new theme, I need to copy these module views into the new themes folder. Doesn’t this go against the Don’t Repeat Yourself Yii principle? I know your theme will use the default view (module/views/login) if theme/views/login doesn’t exist, but if my new theme needs additional HTML elements and CSS classes, then it seems like you are forced to copy the login view to the new theme directory. My concern is if you want to add a “Remember Me” checkbox on the login form down the road, you then have to add it to the module/views/login file and it’s corresponding file under your theme.

Am I missing something here?

You don’t actually need the views in the module’s folder at all, so long as they’re in the theme.

So you can copy any generated files to your theme, change what you need in the theme, but no real need to copy those changes to the module.

Yea, I suppose I could just have one copy of the view under the themes folder. My thought was if I wanted to use (and most likely will) that module in another project I could copy it from my current project’s module folder into the new one. I should also point out my new theme will be using Twitter Bootstrap and I wanted to preserve the default Yii widgets.