Using codegen to make new Theme

Topics: Writing themes
Mar 13, 2012 at 6:12 PM
Edited Mar 13, 2012 at 6:52 PM

Do I need to use in the Codegen command:  codegen theme MyTheme /BasedOn:TheThemeMachine

or is it possible to use any other theme that's available, for example:   /BasedOn:FloralBlack

and after the generation copie over the wanted files?


Other question on Recipe. You can make your own recipe (probably based upon TheThemeMachine). Thats clear for me. But do I have to keep in my own website with my theme MyTheme also the theme of TheTheme Machine, or is it just a very good example to base upon and aftger using it you can uninstall?

Mar 13, 2012 at 6:55 PM

You can use any theme as a base, but that won't change the code that gets copied into the directory by codegen. I tend to shy away from base themes myself, I prefer to copy everything.

Mar 13, 2012 at 7:00 PM

I agree that codegen is copying what is in the basedOn theme, but i thought that i had to copy those files I need from the Styles and Views folders (example site.css and Layout.cshtml). Am I wrong?

Mar 14, 2012 at 3:48 AM

No it's not. basedOn is an inheritance feature that has nothing to do with what codegen copies. You are right though that if you use basedOn you still have to copy files over if you want to override them.