Tales from the Evil Empire

Bertrand Le Roy's blog


Bertrand Le Roy

BoudinFatal's Gamercard

Tales from the Evil Empire - Blogged

Blogs I read

My other stuff


Getting started with custom themes in Orchard


Jesse said:

Great video! Thank you

# June 6, 2011 7:36 PM

Michele said:

if I want to change an element based on the zone where it is, what alternate should I use? For example if I have an html widget in the zone asidefirst, what alternatives shoud I use?

# June 8, 2011 5:52 AM

Steve Gentile said:

popping out to cmd is interesting, but I couldn't help but to wonder what this experience would be like if WebMatrix supported the powershell built in, so the commands could be executed in powershell, in the same manner, ie. MvcScaffolding by Steve Sanderson works.

Good video, (do more!) I didn't realize Orchard could do half of this  :)

# June 8, 2011 7:41 AM

Bertrand Le Roy said:

@Michele: the alternate doesn't exist out of the box (there are alternates with zone name and widget type, but not both at the same time.

If you only have stylistic changes to make (CSS), then you can use this: weblogs.asp.net/.../even-better-customizability-in-orchard.aspx.

If you need to modify the actual template or add alternates, you could follow the technique exposed here, as zones are rendered as zones: weblogs.asp.net/.../orchard-list-customization-first-item-template.aspx. There are differences but that's the idea: add the alternate you need during the zone/widget list rendering.

Another technique that may be simpler is to add the alternate from a shape table provider (see weblogs.asp.net/.../orchard-shapeshifting.aspx).

It's the second time I'm getting this question, so I may blog the details.

# June 8, 2011 2:01 PM

jp said:

Really nice demo. I ran it tonight and it is really smooth :). When running the command prompt with orchard ( bin\orchard.exe ) I think it will be nice to mention the fact that WebMatrix should be shutting down or you end up with the following message : log4net:ERROR [OrchardFileAppender] Unable to acquire lock on file...

Also I noticed that when preview a new theme, if you apply it after the preview orchard is confused and seems have already applied this new theme!!! did I miss something :P.

that's it for now

# June 18, 2011 1:12 AM

jp said:

By the way when using orchard to the command prompt and when creating a new theme based on contoso for instance I have the following warning :

orchard> codegen theme JPTheme /BasedOn:Contoso

Creating Theme JPTheme

Warning: Orchard.Themes project file could not be found at C:\Users\jharroch\Doc

uments\My Web Sites\Orchard CMS\Themes\Themes.csproj

Warning: Solution file could not be found at C:\Users\jharroch\Documents\My Web


Theme JPTheme created successfully

Is that expected?

# June 18, 2011 1:19 AM

Bertrand Le Roy said:

@jp: I don't think the log4net error is due to WM, rather to concurrency with the web server.

For the preview thing, please file a bug with precise repro steps.

# June 18, 2011 1:57 AM

Bertrand Le Roy said:

@jp: yes, thse warnings are expected (I thought I had explained that in the video actually). They are there because you don't have the full source code and it can't find the solution to which to add the new project.

# June 18, 2011 2:08 AM

jp said:

thanks for the reply. I will try to reproduce step by step the issue when applying a new theme when the default one is in place.

still orchard is amazing :)

# June 18, 2011 5:48 PM

jp said:

I did create an issue tracker on codeplex :

Work Item Details

Item # 17963  

# June 18, 2011 6:20 PM

Bertrand Le Roy said:

@jp: merci m'sieur.

# June 19, 2011 1:03 AM