This project is read-only.

Packaging a new customised theme

Topics: Writing themes
Sep 16, 2011 at 11:21 AM

Hi, I just followed these instructions to customise a theme, just changing the background color of the theme machine.

That worked great & showed up in the themes admin/panel, but when I tried to package the theme in order to "install a theme from my computer" on a different orchard instance using the instructions (, the customised Site.css was left out of the package. 

Is there something I'm missing?

Sep 16, 2011 at 7:04 PM

Is there a project file in your theme?

Sep 16, 2011 at 11:32 PM

Yes there is.

I had generated the theme on a copy of the that I was running in IIS.  I had the whole project open in visual studio, I didn't notice the .csproj file in the theme itself at first (even though I did add the /CreateProject:true switch, so ok, of course I should have thought)

I just tried the same experiment on a full source copy of Orchard & this time the package included the site.css

Sep 16, 2011 at 11:34 PM

Aha! Yes, if a theme has a project file, all the files that you want to include need to be referenced by the project.

Sep 16, 2011 at 11:52 PM

I get it now, thanks Bertrand.

So this is how I should have done it:

  1. generated the theme with the project file (so I can use VS & keep in source control)
  2. opened the little project created just for the theme in VS
  3. include the site.css & layout.cshtml files in the project
  4. make changes to site.css
  5. package the theme as before (site.css is included this time!)

Brilliant, thanks!