Contents tagged with Orchard brotips
-
Orchard Brotips: having a big menu perfoming well
TL;DR: use custom links only.
-
Orchard Brotips: modules you should keep enabled/disabled in production or during development
Although with the Precompiled build target, coming with Orchard 1.6, modules can be precompiled into dlls, it's still good practice to disable every feature you don't need in production even if the performance penalty is small. Here's a small list of common modules you should watch out for.
-
Orchard Brotips: politely ask Orchard to submit it for you
This one you will like. Let's take a look at src\Orchard.Web\Core\Contents\Views\Admin\List.cshtml where you can see these lines:
-
Orchard Brotips: deploy without .hg folders
The Orchard web project file, Orchard.Web.csproj contains a line that tells the compiler to include (among others) modules and themes in the result package too. That one currently has a slight, but important glitch: the pattern for excluding Mercurial-related files is broken. Therefore, if you have subrepositories in you solution (like it's frequent with modules or themes) their .hg folders will also be in the deploy package. With big repositories, besides deploying a bunch of unnecessary files, this can even cause errors when publishing:
-
Orchard Brotips: always set Placement.info build action to Content
When you add a Placement.info file to an Orchard module, never forget to set its build action (from under Properties) to "Content"! By default it's "None".
-
MVC Brotip: App_Offline
One of the benefits of using ASP.NET MVC is that during maintenance you are able to put your site to an offline state while making changes that could be interrupted or corrupted by users. In case of Orchard these are typically database I/O jobs. To prevent this, all you need to do is place a file named "App_Offline.htm" to the root directory (Orchard.Web) of your site and display any message to the users using HTML. While this file is present, user requests will not reach the Orchard site, instead handled by the server itself. To restore your site to online state, just rename "App_Offline.htm" to anything else.
-
Orchard Brotips: speeding up Orchard (or really ASP.NET) debugging
Let me guess: you have some kick-ass high-end computer with twenty gigamegaflops of solid state quantum GPU, but debugging an Orchard instance is slow. Particularly starting debugging (and spinning up an Orchard instance) is slow and when opening a page that wasn't yet hit by the JIT compiler is also slow. Meanwhile your computer uses a fraction of its resources.