<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Blog</title><link>http://www.szmyd.com.pl:80/blog</link><description>Blog</description><item><title>Upgrading Orchard and security exceptions</title><link>http://www.szmyd.com.pl:80/blog/upgrading-orchard-and-security-exceptions</link><description>&lt;p&gt;In some cases, when upgrading your Orchard instance, you may see something like this in your logs and wonder,&lt;em&gt; “what the hell is going on??”&lt;/em&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Orchard.Environment.Extensions.ExtensionManager - Error loading extension 'XXX’&lt;br&gt;System.TypeLoadException: Inheritance security rules violated by type: ‘XXX’. Derived types must either match the security accessibility of the base type or be less accessible.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is because of some changes to assembly-level security in Orchard, which makes using the assembly attribute &lt;/p&gt;&lt;pre class="lang-cs prettyprint linenums"&gt;[assembly: SecurityTransparent]&lt;/pre&gt;
&lt;p&gt;to cause trouble. Some older modules had that attribute declared inside the &lt;strong&gt;/Properties/AssemblyInfo.cs &lt;/strong&gt;file. &lt;/p&gt;
&lt;p&gt;The solution is to change the line shown above to:&lt;/p&gt;&lt;pre class="lang-cs prettyprint linenums"&gt;[assembly: SecurityRules(SecurityRuleSet.Level2)]&lt;/pre&gt;
&lt;p&gt;to enforce &lt;a href="http://msdn.microsoft.com/en-us/library/dd233102.aspx" target="_blank"&gt;Level 2 security&lt;/a&gt; in a given module. Removing that line would also help.&lt;/p&gt;
&lt;p&gt;You can read more about security in .NET framework on &lt;a href="http://msdn.microsoft.com/en-us/library/dd233103.aspx" target="_blank"&gt;MSDN&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Mon, 26 Mar 2012 13:05:17 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/upgrading-orchard-and-security-exceptions</guid></item><item><title>Wrapping up content item zones in custom markup</title><link>http://www.szmyd.com.pl:80/blog/wrapping-up-content-item-zones-in-custom-markup</link><description>&lt;p&gt;When it comes to rendering a given content item, Orchard splits it in a couple of zones, like Header, Content and Footer. The markup produced by each of the parts contained in an item is then dispatched to one of those zones. That is what &lt;a href="http://docs.orchardproject.net/Documentation/Understanding-placement-info"&gt;Placement.info&lt;/a&gt; files are mainly used for – they tell the rendering engine in which zone to put a given shape’s final markup.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;But what to do if you’d like to have the whole zone (eg. a Header) wrapped up in some custom markup?&lt;/strong&gt; And what’s more – you’d like it to do in &lt;strong&gt;unobtrusive &lt;/strong&gt;way, so no matter how the whole item is rendered (whether there are some shape alternates or not) – you want a given zone to be always displayed as you want it to be.&lt;/p&gt; &lt;p&gt;I’ve recently came up with a nice technique for doing that. First of all – zones inside a given content item are nothing more than… ordinary shapes! So you are free to attach a wrapper to them, like:&lt;/p&gt;&lt;pre class="lang-cs prettyprint linenums"&gt;public class Shapes : IShapeTableProvider
{
    public void Discover(ShapeTableBuilder builder)
    {
        builder.Describe("Content")
            .OnDisplaying(displaying =&amp;gt;
            {
                // displaying.Shape.Header is the header zone shape!
                var theHeader = displaying.Shape.Header;
                // assign a custom wrapper directly to the header
                theHeader.Metadata.Wrappers.Add("MyHeaderWrapper");
            });
    }
}&lt;/pre&gt;
&lt;p&gt;The only thing left is to create the &lt;strong&gt;MyHeaderWrapper.cshtml:&lt;/strong&gt;&lt;/p&gt;&lt;pre class="lang-html prettyprint linenums"&gt;&amp;lt;div class="my-custom-header"&amp;gt;
    @DisplayChildren(Model)
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;Note the call to &lt;strong&gt;DisplayChildren.&lt;/strong&gt; We remember that the wrapper wraps the whole zone (so Model contains the zone shape), right? And zones are containers for other shapes, so we have to display the contained children – that’s what DisplayChildren is intended for (&lt;em&gt;using &lt;strong&gt;Display&lt;/strong&gt; would run you into the StackOverflowException! Orchard would then try to render your wrapper, and your wrapper, and your wrapper and so on&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;That’s all!&lt;/p&gt;
&lt;p&gt;Now, when you try to open eg. a page, by default you’ll see the markup like this:&lt;/p&gt;&lt;pre class="lang-html prettyprint linenums"&gt;&amp;lt;article class="content-item page"&amp;gt;
    &amp;lt;header&amp;gt;
        &lt;strong&gt;&amp;lt;div class="my-custom-header"&amp;gt;
            Here comes the whole current header
        &amp;lt;/div&amp;gt;&lt;/strong&gt;
    &amp;lt;/header&amp;gt;
    &amp;lt;p&amp;gt;Page content&amp;lt;/p&amp;gt;
&amp;lt;/article&amp;gt;
&lt;/pre&gt;
&lt;p&gt;You’re free to apply this technique to any available zone (like Header, Content, Footer etc.) and to any available content item stereotype (like Content, Widget and so on) For the purpose of this article I just used &lt;em&gt;Content &lt;/em&gt;stereotype and it’s &lt;em&gt;Header&lt;/em&gt; zone.&lt;/p&gt;</description><pubDate>Sun, 25 Mar 2012 16:43:07 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/wrapping-up-content-item-zones-in-custom-markup</guid></item><item><title>Wiring SignalR with Autofac</title><link>http://www.szmyd.com.pl:80/blog/wiring-signalr-with-autofac</link><description>&lt;p&gt;After having a bit of struggle recently (which was quite fun, btw) with making two cool software pieces – Orchard and SignalR – work together, I came up with a simple library that allows you to wire SignalR’s internal dependency injection mechanism with Autofac. Useful thing if you already use Autofac and wish to keep all the dependencies there.&lt;/p&gt; &lt;p&gt;Orchard uses Autofac, so it was pretty obvious that something like this would be necessary at some point to make everything work.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The code is available at GitHub: &lt;/strong&gt;&lt;a href="https://github.com/pszmyd/SignalR.Autofac"&gt;&lt;strong&gt;https://github.com/pszmyd/SignalR.Autofac&lt;/strong&gt;&lt;/a&gt;. I’ll publish the lib as NuGet package shortly.&lt;/p&gt; &lt;h2&gt;Usage&lt;/h2&gt;  &lt;p&gt;It’s simple as hell – just a single class. &lt;strong&gt;To use it in your ASP.NET app, you need to set the SignalR resolver to AutofacDependencyResolver in your bootstrapping/initialization code:&lt;/strong&gt;&lt;/p&gt;&lt;pre class="prettyprint linenums lang-cs"&gt;var resolver = new AutofacDependencyResolver(lifetimeScope); 
AspNetHost.SetResolver(resolver); 
&lt;/pre&gt;
&lt;p&gt;It takes a single ctor argument – your Autofac container instance (ILifetimeScope).&lt;/p&gt;
&lt;p&gt;The simplest example could look like this (&lt;em&gt;assuming Initialize is a method that bootstraps your application&lt;/em&gt;):&lt;/p&gt;&lt;pre class="prettyprint linenums lang-cs"&gt;public void Initialize() { 
    // Building the Autofac container 
    var builder = new ContainerBuilder(); 
    builder.RegisterType&amp;lt;SomeType&amp;gt;().As&amp;lt;ISomeInterface&amp;gt;; 
    
    // .... 

    var container = builder.Build(); 
    var resolver = new AutofacDependencyResolver(container); 
    AspNetHost.SetResolver(resolver); 
}
&lt;/pre&gt;
&lt;p&gt;And that’s all. Now, you can use all the types that SignalR registers (eg. IConnectionManager) in other parts of your application and vice-versa.&lt;/p&gt;</description><pubDate>Fri, 16 Mar 2012 21:36:28 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/wiring-signalr-with-autofac</guid></item><item><title>Orchard 1.4 is here!</title><link>http://www.szmyd.com.pl:80/blog/orchard-1.4-is-here</link><description>&lt;p&gt;Finally!&amp;nbsp;Today we officially announced the &lt;a href="http://docs.orchardproject.net/Documentation/Orchard-1-4-Release-Notes" target="_blank"&gt;new Orchard release - version 1.4&lt;/a&gt;. It's a big step forward from the previous, 1.3.10 version, both in terms of performance and features.&lt;/p&gt;
&lt;p&gt;Unfortunately, it comes with a price... There are some &lt;strong&gt;breaking changes&lt;/strong&gt; which might cause some modules to stop working. Especially those modules that utilize the routing features (ie. deal with all the items accessible by URLs).&amp;nbsp;&lt;em&gt;It also affects the &lt;a href="http://orchardmenu.codeplex.com/" target="_blank"&gt;Advanced Menu&lt;/a&gt; module, so the current 1.3 version &lt;span style="text-decoration: underline;"&gt;won't work&lt;/span&gt; with Orchard 1.4 out-of-the-box. I'll be submitting the compatible version to the Gallery tomorrow [&lt;strong&gt;UPDATE: Unfortunately the module release will be delayed by one day&lt;/strong&gt;].&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You can find detailed information on the &lt;a href="http://docs.orchardproject.net/Documentation/Orchard-1-4-Release-Notes" target="_blank"&gt;release notes&lt;/a&gt; page.&lt;/p&gt;</description><pubDate>Thu, 01 Mar 2012 02:30:00 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/orchard-1.4-is-here</guid></item><item><title>Orchard Steering Committee elections announced</title><link>http://www.szmyd.com.pl:80/blog/orchard-steering-committee-elections-announced</link><description>&lt;p&gt;Bertrand Le Roy, PM at Microsoft and leader of the Orchard project, has &lt;a href="http://orchard.codeplex.com/discussions/270600"&gt;&lt;strong&gt;announced today the creation of Orchard Steering Committee&lt;/strong&gt;&lt;/a&gt;, a board responsible for future key (including design) decisions about the project, working closely with the core team at Microsoft. Members of the board will be chosen among the most enthusiastic and active community members in incoming elections. &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Hi all, &lt;p&gt;I've alluded to it before, and now is the time to get this started. We are ready to take the next step in making Orchard a community-based project and incorporating more community participation. We want key decisions (including design) to be handled going forward by a small group of enthusiastic community members in addition to input by the core team at Microsoft. We think about that in the following way: &lt;ul&gt; &lt;li&gt;We'll make a call for candidacy for each of the five seats on the committee. Actually, this post is it.  &lt;li&gt;Seats will be for a year (with an option to leave early if necessary), and will be renewable.  &lt;li&gt;Candidates must commit to spending a portion of their time (personal or professional with their employer's permission) every week. Count on one 1-hour Lync meeting a week usually, plus involvement in feature teams if you so desire. A candidate can be anyone who is active in the community and who is using Orchard. It is not required that you are a ninja coder (although we love ninjas), only that you are passionate and active.  &lt;li&gt;The first elected committee will determine the rules of the game going forward, including the voting process, triage, commit rights, etc.  &lt;li&gt;One of the seats will be for the job of Benevolent Dictator, whose powers are to be determined. Maybe veto or unblocking stalemates.  &lt;li&gt;If we have more candidates than seats, we'll set-up a vote (will be able to vote people who have CodePlex accounts and who have posted at least once on the Orchard discussions).  &lt;li&gt;We’ll create a new mailing-list for the committee, that will be public and archived.  &lt;li&gt;For each development sprint, the committee will spin up feature teams and make calls for participation. Details on this will follow.  &lt;li&gt;We will also need an additional person taking the role of Patch Master (more on this later). This role can be cumulated with a steering committee seat. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;All comments on this are of course welcome. &lt;p&gt;So there it is. Please make your candidacy known to the world by answering this post. Myself (Bertrand Le Roy) and Sébastien Ros are candidates. I will also be a candidate to the role of Benevolent Dictator. &lt;p&gt;We will leave the thread open for candidacies until 11:59:59PM PST on September 9th, at which point we’ll start the voting process. You will have a week to vote (until 11:59:59PM PST on September 16th), and we’ll announce results on September 19th. &lt;p&gt;Cheers,&lt;br&gt;Bertrand&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;That being said, I’ve obviously &lt;/strong&gt;&lt;a href="http://orchard.codeplex.com/discussions/270600#post664251"&gt;&lt;strong&gt;thrown myself&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; into the hat for candidacy!&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/afb26209e9c0_121BF/wlEmoticon-smile_2.png"&gt;&lt;/strong&gt; I’d be more than happy for your support for my candidacy in the incoming elections.&lt;/p&gt; &lt;p&gt;It would be so nice to be in the center of the project, which you’ve spent endless hours working with, extending and watching it grow from it’s early days. But first and foremost - nothing could happen without the awesome, growing community gathered around the project, helping which I really enjoy! Being a part of the Orchard Steering Committee could help spreading a word about Orchard to a much broader audience, which is what I’ve always been trying to do&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/afb26209e9c0_121BF/wlEmoticon-smile_2.png"&gt;&lt;/p&gt; &lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Sat, 27 Aug 2011 19:35:37 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/orchard-steering-committee-elections-announced</guid></item><item><title>DI property injection in Orchard</title><link>http://www.szmyd.com.pl:80/blog/di-property-injection-in-orchard</link><description>&lt;p&gt;As everyone developing apps using Orchard surely know, constructor injection in Orchard is a built-in feature. It&amp;rsquo;s used extensively throughout the whole framework and makes the developer&amp;rsquo;s life way much easier&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/b0969098e156_A13/wlEmoticon-smile_2.png" /&gt; But there are scenarios where it&amp;rsquo;s not enough and one may want to do property injection instead. The most common reason is a danger of having circular dependencies, nasty thing hard to trace and sometimes very hard to fix&amp;hellip;&lt;/p&gt;
&lt;p&gt;Property injection comes to the rescue, but it&amp;rsquo;s not a thing that comes out-of-the-box in Orchard. It&amp;rsquo;s ok that the framework doesn&amp;rsquo;t try to forcibly fill my object properties &amp;ndash; property injection should be used only as an alternative to ctor injection and only in certain scenarios.&lt;/p&gt;
&lt;p&gt;There are two ways to fill object properties with instances from the container in Orchard, which I found the most useful:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;On the object&amp;rsquo;s level (the one that has properties you need to fill) &amp;ndash; using Autofac&amp;rsquo;s &lt;strong&gt;IComponentContext.InjectUnsetProperties(object)&lt;/strong&gt; method.&lt;/li&gt;
&lt;li&gt;On the global level &amp;ndash; via &lt;strong&gt;Autofac.Module&lt;/strong&gt; implementation, utilizing the former&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Object-level property initialization&lt;/h1&gt;
&lt;p&gt;It&amp;rsquo;s a good way to go if you want to inject properties of a specific object only.&lt;/p&gt;
&lt;p&gt;This approach requires you to have &lt;strong&gt;IWorkContextAccessor&lt;/strong&gt; object injected into the constructor first. Let&amp;rsquo;s call this object &lt;strong&gt;&amp;lsquo;context&amp;rsquo;.&lt;/strong&gt; Filling the object is as easy as calling &lt;strong&gt;context.Resolve&amp;lt;IComponentContext&amp;gt;().InjectUnsetProperties(this). &lt;/strong&gt;You may do that wherever you want to, eg. in a place where your object initialization happens. Of course look out with calling that in a constructor &amp;ndash; you may easily run into a circular dependency problem. It&amp;rsquo;s meant to be called &lt;strong&gt;after &lt;/strong&gt;the object has been constructed.&lt;/p&gt;
&lt;p&gt;Of course you may pass any object to &lt;strong&gt;InjectUnsetProperties&lt;/strong&gt; method and have it&amp;rsquo;s properties filled.&lt;/p&gt;
&lt;h1&gt;Global-level property injection&lt;/h1&gt;
&lt;p&gt;Use this approach if you want to do property injection on all objects registered in the container.&lt;/p&gt;
&lt;p&gt;It is a more complex solution as it requires you to create an implementation of Autofac.Module class and plug into the container-building processes. Nothing to fear, though&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/b0969098e156_A13/wlEmoticon-smile_2.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First of all we need to create and implementation of &lt;strong&gt;Autofac.Module&lt;/strong&gt; class and override method &lt;strong&gt;AttachToComponentRegistration(IComponentRegistry componentRegistry, IComponentRegistration registration).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next step is to hook up the &lt;strong&gt;Activated &lt;/strong&gt;event of a given&lt;strong&gt; IComponentRegistration&lt;/strong&gt; and pass an event handler to it that would inject all unset properties of a processed object. Here is the code:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;MyModule &lt;/span&gt;: &lt;span style="color: #2b91af;"&gt;Module &lt;/span&gt;{
    &lt;span style="color: blue;"&gt;protected override void &lt;/span&gt;AttachToComponentRegistration(
        &lt;span style="color: #2b91af;"&gt;IComponentRegistry &lt;/span&gt;componentRegistry, 
        &lt;span style="color: #2b91af;"&gt;IComponentRegistration &lt;/span&gt;registration)
    {
        registration.Activated += (s, e) 
            =&amp;gt; e.Context.InjectUnsetProperties(e);
    }
}&lt;/pre&gt;
&lt;p&gt;Nothing more, nothing less &amp;ndash; very simple stuff, I told you&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Puszczam oczko" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/b0969098e156_A13/wlEmoticon-winkingsmile_2.png" /&gt; This is only a simple example, of course -&amp;nbsp; you can put more fancy logic inside if you need to (e.g.. act only on specific objects and such).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I&amp;rsquo;ve recently &lt;/em&gt;&lt;a href="http://stackoverflow.com/questions/6749997/how-to-make-autofac-perform-property-injection-in-orchard-cms"&gt;&lt;em&gt;posted an answer&lt;/em&gt;&lt;/a&gt;&lt;em&gt; on SO to question about achieving property injection in Orchard. It was about filling properties of a &lt;strong&gt;specific type only,&lt;/strong&gt; leaving other properties untouched &amp;ndash; a bit more sophisticated stuff. If that&amp;rsquo;s your case &amp;ndash; take a look. The solution I provided was based on the &lt;strong&gt;Orchard.Logging.LoggingModule,&lt;/strong&gt; which injects &lt;strong&gt;ILogger &lt;/strong&gt;implementations.&lt;/em&gt;&lt;/p&gt;</description><pubDate>Thu, 25 Aug 2011 00:09:33 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/di-property-injection-in-orchard</guid></item><item><title>Moving to Orchard 1.2 - Impressions</title><link>http://www.szmyd.com.pl:80/blog/moving-to-orchard-1.2-impressions</link><description>&lt;p&gt;After a short struggling I managed to successfully move my site to Orchard 1.2. Official release is just around the corner, but couldn&amp;rsquo;t help myself and built my own from the latest source:)&lt;/p&gt;
&lt;p&gt;Until yesterday my site was running on Orchard 1.0. It&amp;rsquo;s been a while since then and much has changed. That made the transition process a bit more complicated than I previously thought, although was clearly worth it.&lt;/p&gt;
&lt;h1&gt;First impression&lt;/h1&gt;
&lt;p&gt;The most stunning impression is performance. The performance gain is &lt;strong&gt;tremendous&lt;/strong&gt; comparing to previous versions, which can be clearly seen at first sight (or better &amp;ndash; first page load). The Orchard Team has done a really great job!&lt;/p&gt;
&lt;p&gt;From the UI point of view changes (comparing to 1.1) are barely noticeable, but my opinion is surely biased. I&amp;rsquo;ve been working with recent source code base all the time and just got used to it:) The official release notes (coming soon) would surely be much better source of information about all changes from the latest release.&lt;/p&gt;
&lt;h1&gt;v1.0 to v1.2 transition process&lt;/h1&gt;
&lt;p&gt;Orchard docs &lt;a href="http://www.orchardproject.net/docs/Upgrading-a-site-to-a-new-version-of-Orchard.ashx"&gt;describe the process&lt;/a&gt; very well &amp;ndash; I did everything exactly as they say which made the transition pretty easy. I ran into some problems at the modules&amp;rsquo; upgrade step, though. Those apply to 1.0 &amp;ndash; 1.1 transition too.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Some older, &lt;span style="text-decoration: underline;"&gt;enabled&lt;/span&gt; features will break when the core code gets upgraded.&lt;/em&gt; This issue is related to modules dependent on code touched by breaking changes (e.g. v1.1 replaced &lt;em&gt;string&lt;/em&gt; with &lt;em&gt;LocalizedString &lt;/em&gt;in MenuItem class which causes the first version of Advanced Menu, targeted to Orchard 1.0, to bomb the 1.2 instance). The solution is to disable such features prior to upgrading Orchard. If you forgot to do that and run into YSOD, you can use the &amp;ldquo;&lt;em&gt;feature disable&lt;/em&gt;&amp;rdquo; command from &lt;a href="http://www.orchardproject.net/docs/Using-the-command-line-interface.ashx"&gt;Orchard command-line&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Some features, previously available as separate modules, has been pushed to the core.&lt;/em&gt; If you have the old ones installed you can run into YSOD because of ambiguous class references. I stumbled upon this problem with &lt;a href="http://www.orchardproject.net/gallery/List/Modules/Orchard.Module.Iroo.PackageManager"&gt;Iroo.PackageManager&lt;/a&gt;, which since v1.1 is available in core Orchard.Packaging module. In this case, just uninstall the old module. Uninstallation has to be done by hand, as described in &lt;a href="http://orchard.codeplex.com/discussions/246309"&gt;this thread&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Besides that, everything went perfectly fine and now I&amp;rsquo;m a happy user of the newest Orchard Team&amp;rsquo;s creation!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE (2011/06/15): &lt;/strong&gt;&lt;a href="http://orchard.codeplex.com/releases/view/65184"&gt;&lt;strong&gt;Orchard 1.2&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; has just been released!&lt;/strong&gt;&lt;/p&gt;</description><pubDate>Tue, 14 Jun 2011 15:51:27 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/moving-to-orchard-1.2-impressions</guid></item><item><title>Orchard Advanced Menu 1.3 released!</title><link>http://www.szmyd.com.pl:80/blog/orchard-advanced-menu-1.3-released</link><description>&lt;p&gt;New release is &lt;a href="http://www.orchardproject.net/gallery/List/Modules/Orchard.Module.Szmyd.Orchard.Modules.Menu"&gt;finally out&lt;/a&gt;! I managed to fix all reported bugs, add some new goodies, do a lot of refactoring and boost performance a little bit. Hope it&amp;rsquo;ll serve you well.&lt;/p&gt;
&lt;h1&gt;What&amp;rsquo;s new?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MenuRelationPart.&lt;/strong&gt; The part that allows attaching an item to one or more different menus directly from that item&amp;rsquo;s creation/edit screen. It behaves similar to the default menu part (that added &amp;ldquo;Show on main menu&amp;rdquo; checkbox) and replaces it. It&amp;rsquo;s attached to Page, Blog and BlogPost content types by default, but you can attach it to any custom content type you need, in order to allow adding menu links to it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Menu widget creation from command-line. &lt;/strong&gt;You can now create menu widgets directly from Orchard command-line or from your custom recipes. Simply use the command &amp;ldquo;&lt;em&gt;menuwidget create&lt;/em&gt;&amp;rdquo;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;Great thanks to Raymond de Jong for contributing this piece of code!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New menu widget display mode &amp;ndash; SiblingsExpanded.&lt;/strong&gt; In this mode the menu is displayed in full, but children are rendered only for the items on selection path. &lt;em&gt;Basically, the menu in this mode looks like a tree-view with single path fully-rendered and others collapsed to the topmost node.&lt;/em&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;What&amp;rsquo;s changed?&lt;/h1&gt;
&lt;p&gt;These are some of the most important changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Counters and Breadcrumbs has been moved to separate features.&lt;/strong&gt; They are disabled by default. You can enable them, if you wish, from the Modules admin pane.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Marking selected/current menu items.&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;ldquo;Current&amp;rdquo; CSS class&lt;/strong&gt; is used to mark the selected menu item, corresponding to currently viewed page.&lt;em&gt; If you have more than one item with the same URL in a single menu &amp;ndash; all of them will be marked as &amp;ldquo;current&amp;rdquo;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;ldquo;Selected&amp;rdquo; CSS class&lt;/strong&gt; is used to mark all parent items (path), starting from the one that is actually being viewed. &lt;em&gt;If you have more than one item with the same URL in a single menu &amp;ndash; only the first one will have the path marked. &lt;/em&gt;The same applies to breadcrumbs &amp;ndash; the first valid path found from the current item to the top will be used.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Menu items list in admin view has been filled with additional data (URL, direct links to corresponding content items and the item type)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Changed the name of &amp;ldquo;templated menu item&amp;rdquo; to &amp;ldquo;menu item /w custom Html&amp;rdquo; in admin UI. &lt;/strong&gt;There were some misunderstandings about what is it for and I guess putting a more descriptive name is a good idea.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dropdowns instead of textboxes&lt;/strong&gt; for choosing a menu in menu/breadcrumbs widgets.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Renamed menu widget display modes to be more descriptive.&lt;/strong&gt; It&amp;rsquo;s a topic for the next post.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lots of other minor things&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Orchard-Advanced-Menu-1.3-released_FC81/wlEmoticon-smile_2.png" /&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;What&amp;rsquo;s been fixed?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Issue with deleting menus which rendered menus non-removable.&lt;/li&gt;
&lt;li&gt;Menu and breadcrumbs rendering issues. In some cases the module rendered empty, additional &amp;lt;li&amp;gt; tags between parent and child menu items.&lt;/li&gt;
&lt;li&gt;After enabling shape tracing, menu items text got overwritten by shape Url (shape tracing has been overwriting an existing property on menu item shape)&lt;/li&gt;
&lt;li&gt;In some cases, selected menu items hasn&amp;rsquo;t been correctly marked with appropriate CSS classes.&lt;/li&gt;
&lt;li&gt;Serialization issues with counters when using SQL Server session store.&lt;/li&gt;
&lt;li&gt;Incorrect menu level cutting when using &amp;ldquo;Limit levels&amp;rdquo; feature&lt;/li&gt;
&lt;li&gt;Link to &amp;lsquo;main&amp;rsquo; menu appearing even after &amp;lsquo;main&amp;rsquo; menu deletion.&lt;/li&gt;
&lt;li&gt;Error when trying to recreate menu with the same name as previously deleted menu. It&amp;rsquo;s an issue with Orchard &amp;ndash; by default menu items are not removed from database (just hidden from UI), so unique constraint on menu names throw errors with subsequent inserts.&lt;/li&gt;
&lt;li&gt;Menu display mode dropdown doesn't keep selected value when you come to edit it again&lt;/li&gt;
&lt;li&gt;Menu widget display modes doesn&amp;rsquo;t work as expected.&lt;/li&gt;
&lt;li&gt;Filling menu with existing items creates duplicates.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Cut lower levels&amp;rdquo; option in menu widget works exactly the opposite way.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Many thanks for the giant load of feedback some of you provided since &lt;a href="http://www.szmyd.com.pl/blog/featuring-orchard-advanced-menu"&gt;last release&lt;/a&gt;. It really helped me a lot when it came to bugfixing and thinking about new features for this release. &lt;strong&gt;My special thanks go to Raymond de Jong and &lt;a href="http://www.nogginbox.co.uk/"&gt;Richard Garside&lt;/a&gt; for code contributions and great amount of feedback!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Btw - I&amp;rsquo;m going to write some more detailed tutorial on module usage soon, so stay tuned.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Orchard-Advanced-Menu-1.3-released_FC81/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;</description><pubDate>Sun, 12 Jun 2011 00:16:55 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/orchard-advanced-menu-1.3-released</guid></item><item><title>Removing items in Orchard</title><link>http://www.szmyd.com.pl:80/blog/removing-items-in-orchard</link><description>&lt;p&gt;Some of you reported an issue with deleting menus in Advanced Menu module. It was widely discussed in &lt;a href="http://www.szmyd.com.pl/blog/featuring-orchard-advanced-menu"&gt;initial post&lt;/a&gt; comments and on &lt;a href="http://stackoverflow.com/questions/5998440/orchard-cms-navigation-does-not-work-anymore/6117940#6117940"&gt;StackOverflow&lt;/a&gt;. I&amp;rsquo;ve investigated that issue and was pretty surprised with findings. It looks like it was related to how Orchard handles content item removal, what is a pretty interesting thing because it works differently as one may think. &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Content items never get completely deleted.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Remember that when designing your content parts. They have only certain flags removed which makes them invisible to further queries.&amp;nbsp; It&amp;rsquo;s a desirable behavior in many cases, as it allows items to be undeleted, browse history etc. But it raises a couple of issues though, e.g.. with unique columns on content part records &amp;ndash; you cannot recreate the removed item with the same value, as it&amp;rsquo;s there all the time.&lt;/p&gt;
&lt;p&gt;If you want to completely erase an item &amp;ndash; you can do that via &lt;em&gt;IRepository&amp;lt;ContentItem&amp;gt;&lt;/em&gt; when needed (e.g.. in &lt;em&gt;ContentHandler&amp;rsquo;s OnRemoved&lt;/em&gt; event). Related content part records will be automatically deleted. I hope that future Orchard releases will have the feature to delete content items via &lt;em&gt;ContentManager &lt;/em&gt;built-in.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thanks to &lt;/em&gt;&lt;a href="http://www.codeplex.com/site/users/view/loudej"&gt;&lt;em&gt;Louis De Jardin&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, who described it in details &lt;/em&gt;&lt;a href="http://orchard.codeplex.com/discussions/259018"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Fri, 27 May 2011 20:47:48 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/removing-items-in-orchard</guid></item><item><title>New code generation features for Orchard</title><link>http://www.szmyd.com.pl:80/blog/new-code-generation-features-for-orchard</link><description>&lt;p&gt;Back on track after a short break!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/eadea774d187_886/wlEmoticon-smile_2.png" /&gt; I&amp;rsquo;ve just uploaded to the Orchard Gallery a much updated version of Code Generation Extensions module.&lt;/p&gt;
&lt;p&gt;Some of you asked for features such as settings codegen and assigning the generated part to specific feature. Here they are! I described the basic commands and usage of those in my &lt;a href="http://www.szmyd.com.pl/blog/generating-orchard-content-parts-via-command-line"&gt;previous article&lt;/a&gt;. Now, I&amp;rsquo;d like to describe the new goodies, starting from&amp;hellip;&lt;/p&gt;
&lt;h1&gt;Introducing &amp;lsquo;codegen typesettings&amp;rsquo;&lt;/h1&gt;
&lt;p&gt;This is a new Orchard CLI command that generates all files necessary for adding type-specific settings to any existing part. Such settings are commonly used for holding some default values for content parts. You can read more about those &lt;a href="http://www.szmyd.com.pl/blog/using-custom-settings-in-orchard-part-2-content-type-settings"&gt;here&lt;/a&gt; and &lt;a href="http://www.orchardproject.net/docs/Adding-custom-settings.ashx"&gt;here&lt;/a&gt; (&lt;em&gt;which is the same post, just copied to the official docs&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Like the&lt;strong&gt; &amp;lsquo;codegen part&amp;rsquo;&lt;/strong&gt; command,&lt;strong&gt; &amp;lsquo;codegen typesettings&amp;rsquo;&lt;/strong&gt; also has a&lt;strong&gt; /Properties:&lt;/strong&gt; switch (optional parameter), with exactly the same syntax. It allows you to easily provide necessary properties via command-line. If you do so, the form fields necessary for editing those properties will be automatically created in an appropriate .cshtml file (&lt;em&gt;which can save you some keystrokes &lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Puszczam oczko" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/eadea774d187_886/wlEmoticon-winkingsmile_2.png" /&gt;&lt;/em&gt;).&lt;/p&gt;
&lt;h1&gt;New parameters in &amp;lsquo;codegen part&amp;rsquo;&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;/ForFeature:&amp;lt;feature-name&amp;gt; &amp;ndash;&lt;/strong&gt; this switch lets you specify which feature (existing in your module, of course) the generated part has to be specifically bound to. &lt;em&gt;The existence of a feature you specify isn&amp;rsquo;t being verified (yet), so look out for typing errors.&lt;/em&gt; For those of you who would like to get into greater detail &amp;ndash; &lt;em&gt;it adds an appropriate&lt;strong&gt; [OrchardFeature(&amp;hellip;)]&lt;/strong&gt; attribute to generated classes.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;/AttachTo:&amp;lt;type-name&amp;gt;&lt;/strong&gt; &amp;ndash; allows you to specify the &lt;em&gt;content type&lt;/em&gt; this part should be automatically attached to. As you may or may not know, attaching parts to content types in Orchard can be done twofold &amp;ndash; by &lt;a href="http://www.orchardproject.net/docs/Creating-a-module-with-a-simple-text-editor.ashx"&gt;describing the structure&lt;/a&gt; in data migrations class (which can be further modified via admin UI) or by hardcoding the relation in content handler using &lt;em&gt;ActivationFilter&lt;/em&gt; (like e.g.. &lt;a href="http://www.szmyd.com.pl/blog/how-to-add-settings-to-your-content-parts-and-items"&gt;site settings&lt;/a&gt; do).&lt;em&gt;&lt;strong&gt; &lt;/strong&gt;This command uses the second approach.&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;This switch makes creation of &lt;a href="http://www.szmyd.com.pl/blog/how-to-add-settings-to-your-content-parts-and-items"&gt;site settings&lt;/a&gt; as easy as specifying &lt;em&gt;/AttachTo:Site&lt;/em&gt;. &lt;em&gt;Site&lt;/em&gt; is a content type in Orchard, so you can attach to it virtually any part you want!&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;/ShapeFile:&amp;lt;name&amp;gt;&lt;/strong&gt; &amp;ndash; if you want to provide your own name for generated shape files instead of part name &amp;ndash; this is the right place. &lt;strong&gt;Do not specify the file extension (.cshtml) here &amp;ndash; it will be added automatically&lt;/strong&gt;. This parameter allows you to keep your file-naming scheme intact (e.g.. &lt;em&gt;Funny.MyPart.cshtml&lt;/em&gt; instead of &lt;em&gt;MyFunnyPart.cshtml&lt;/em&gt;, where &lt;em&gt;MyFunnyPart&lt;/em&gt; is the name of your part).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;I&amp;rsquo;d like to thank Brad Millington very much for &lt;a href="http://channel9.msdn.com/events/MIX/MIX11/FRM06"&gt;mentioning this module during speech on MIX11!&lt;/a&gt;&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/eadea774d187_886/wlEmoticon-smile_2.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That is all for now. I&amp;rsquo;ll probably make some more additions soon so stay tuned!&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Tue, 26 Apr 2011 23:36:49 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/new-code-generation-features-for-orchard</guid></item><item><title>Generating Orchard content parts via command-line</title><link>http://www.szmyd.com.pl:80/blog/generating-orchard-content-parts-via-command-line</link><description>&lt;p&gt;Creating a content part in Orchard, even the most trivial one, involves creating many small objects &amp;ndash; handler, driver, model (main part object), record, display and editor shapes to name a few. As I was tired of hand-creating/copy-pasting all those every time I needed a content part I wrote a simple Orchard module that automates the process (&lt;em&gt;being a dev is about making life easier, right?&lt;/em&gt;)&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Content-part-code-generation-in-Orchard_224E/wlEmoticon-smile_2.png" /&gt; I called that module &lt;strong&gt;Code Generation Extensions&lt;/strong&gt;, as it generally extends the default codegen features.&lt;/p&gt;
&lt;p&gt;Module adds an Orchard command-line command&lt;strong&gt; &amp;ldquo;codegen part&amp;rdquo;&lt;/strong&gt;. It&amp;rsquo;s syntax is as follows:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;codegen part &lt;em&gt;&amp;lt;module_name&amp;gt; &amp;lt;part_name&amp;gt;&lt;/em&gt; [&lt;em&gt;/Properties:&amp;lt;comma-delimited list of name:type pairs&amp;gt;&lt;/em&gt;]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;codegen part Modules.Shop ProductPart /Properties: Name:string, Price:int&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Properties is an optional parameter, so if you&amp;rsquo;d like to create an empty part you can just write&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;codegen part Modules.Shop ProductPart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The command creates a handler, driver, model, record, display and editor shapes and updates the Placement.info file with default &lt;em&gt;Content:before&lt;/em&gt; placement for your part shape. If you provide &lt;em&gt;/Properties&lt;/em&gt; parameter, the model, record and editor shapes will be filled with appropriate code accordingly.&lt;/p&gt;
&lt;p&gt;You can &lt;a href="http://www.orchardproject.net/gallery/List/Modules/Orchard.Module.Szmyd.CodeGeneration"&gt;download&lt;/a&gt; the module from the &lt;a href="http://www.orchardproject.net/gallery/List/Modules/Orchard.Module.Szmyd.CodeGeneration"&gt;Orchard Gallery&lt;/a&gt;. Feel free to play with it and I hope you find it useful!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Content-part-code-generation-in-Orchard_224E/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Thu, 07 Apr 2011 00:52:37 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/generating-orchard-content-parts-via-command-line</guid></item><item><title>Featuring Orchard Advanced Menu</title><link>http://www.szmyd.com.pl:80/blog/featuring-orchard-advanced-menu</link><description>&lt;p&gt;New Hierarchical Menu module release is finally here. As you probably noticed, the module name has changed to &lt;em&gt;Advanced Menu&lt;/em&gt;, as I guess it&amp;rsquo;s more appropriate now. Why? This is basically what I&amp;rsquo;m about to write about, as there&amp;rsquo;s been &lt;span style="text-decoration: underline;"&gt;a lot&lt;/span&gt; of changes since the last release&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/df3da1739b0e_F594/wlEmoticon-smile_2.png" /&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;First and foremost &amp;ndash; the module is prepared to &lt;strong&gt;work with the upcoming Orchard 1.1&lt;/strong&gt; release! The bad news about it is that it probably won&amp;rsquo;t work with the Orchard 1.0, because the new release introduces some &lt;strong&gt;breaking changes &lt;/strong&gt;(e.g. different LocalizationString handling). Would there be a demand for backward compatibility, I&amp;rsquo;ll do my best to try adding that (I have to make some research if it&amp;rsquo;s possible at all first).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;As the module takes part in the &lt;/strong&gt;&lt;a href="http://www.orchardproject.net/omc"&gt;&lt;strong&gt;Orchard Module Challenge&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, I created a simple &lt;/strong&gt;&lt;a href="http://orchard18.webmatrix-appliedi.net/"&gt;&lt;strong&gt;demo site&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, which shows it&amp;rsquo;s most powerful features&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/df3da1739b0e_F594/wlEmoticon-smile_2.png" /&gt; Check it out!&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;New features&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Version 1.2 introduces many features not available in previous versions (in addition to changes to existing ones, which are described later in this article):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Custom menus&lt;/strong&gt;&amp;ndash; ability to create your own menus.
&lt;ul&gt;
&lt;li&gt;Easily create different menus &lt;strong&gt;for different purposes&lt;/strong&gt;, e.g. separate the menus used for display and breadcrumb rendering&lt;/li&gt;
&lt;li&gt;You can&lt;strong&gt; auto-fill&lt;/strong&gt; the created menu with existing content items (Pages, Blogs, Lists etc.) with just a click of a button. There is also an option to include contained items (e.g. Blog posts, List items and such)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Styled menu widget &amp;ndash; &lt;/strong&gt;styled and scripted with &lt;a href="http://users.tpg.com.au/j_birch/plugins/superfish/"&gt;Superfish&lt;/a&gt; jQuery library menu widget with color customization options. Works with all major browsers and degrades gracefully when JS is disabled&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Templated menu items&lt;/strong&gt; &amp;ndash; you can put your own Html markup inside menu items&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visit counters &amp;ndash; &lt;/strong&gt;attach a visit counter to any displayable content type (attached to Page type by default)
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scoped&lt;/strong&gt; &amp;ndash; you can choose from three predefined counter scopes: &lt;strong&gt;PerSite, PerUser&lt;/strong&gt; and &lt;strong&gt;PerSession&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;This is the flag use of the counting framework I created while rewriting the included RecentlySeenWidget (which now utilizes this). There&amp;rsquo;s way more than this, but this is clearly a topic for a different article.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When the Advanced Menu module&amp;nbsp;is enabled, the default menu&amp;nbsp;gets automatically replaced with StyledMenuWidget. So you don't have to create the first widget by hand, as it's already there!&amp;nbsp;You can change it or replace from the Dashboard if you need to.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Changes&lt;/strong&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More menu and menu item rendering options&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Optional wrapping of sub-items in additional &amp;lt;div&amp;gt; tags&lt;/li&gt;
&lt;li&gt;Add optional subtitle to menu items&lt;/li&gt;
&lt;li&gt;Hide/show menu item&amp;rsquo;s text&lt;/li&gt;
&lt;li&gt;Render menu item as link (default) or just as a plain text&lt;/li&gt;
&lt;li&gt;Limit the number of menu levels displayed with an option to cut or flatten to a single list the items below threshold&lt;/li&gt;
&lt;li&gt;Specify which menu item children to use as a top level of a displayed menu. By default none, which means that the whole menu is rendered&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tweaks for easy styling/scripting&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Unique Id attribute for each menu widget &amp;ndash; &lt;/strong&gt;each menu widget has a unique &lt;strong&gt;menu-&amp;lt;item_id&amp;gt;&lt;/strong&gt;&amp;nbsp; HTML Id attribute to allow targeting specific menu with jQuery/CSS selectors. The &lt;em&gt;item_id&lt;/em&gt; is menu widget&amp;rsquo;s content item Id.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unique Id attribute for each counter &amp;ndash; &lt;strong&gt;counter-&amp;lt;item_id&amp;gt;, &lt;/strong&gt;&lt;/strong&gt;analogous to the former&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Additional CSS classes for counters&lt;/strong&gt; &amp;ndash; &lt;strong&gt;counter-&amp;lt;counter_scope&amp;gt;&lt;/strong&gt;, where &lt;em&gt;counter_scope&lt;/em&gt; is the scope used &lt;em&gt;(&amp;ldquo;PerSite&amp;rdquo;, &amp;ldquo;PerUser&amp;rdquo; or &amp;ldquo;PerSession&amp;rdquo;).&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Additional shape alternates for customization&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Menu__[item_id]&lt;/strong&gt;, where &lt;em&gt;item_id&lt;/em&gt; stands for MenuWidget/StyledMenuWidget content item Id. Example: &lt;em&gt;Menu-33.cshtml&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Breadcrumbs__[item_id]&lt;/strong&gt; &amp;ndash; where &lt;em&gt;item_id&lt;/em&gt; is BreadcrumbsWidget content item Id. Example: &lt;em&gt;Breadcrumbs-22.cshtml&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Breadcrumbs__[menu_name]&lt;/strong&gt; &amp;ndash; where &lt;em&gt;menu_name&lt;/em&gt; is the name of menu used to render BreadcrumbsWidget. Example: &lt;em&gt;Breadcrumbs-main.cshtml&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Counter__[counter_scope]&lt;/strong&gt; &amp;ndash; where &lt;em&gt;counter_scope&lt;/em&gt; is counter scope used &lt;em&gt;(&amp;ldquo;PerSite&amp;rdquo;, &amp;ldquo;PerUser&amp;rdquo; or &amp;ldquo;PerSession&amp;rdquo;).&lt;/em&gt; Example: &lt;em&gt;Counter-PerSite.cshtml&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Counter__[item_type] &amp;ndash; &lt;/strong&gt;where &lt;em&gt;item_type&lt;/em&gt; is the name of content type the counter is attached to. Example: &lt;em&gt;Counter-BlogPost.cshtml&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Counter__[item_id] &amp;ndash;&lt;/strong&gt; where &lt;em&gt;item_id&lt;/em&gt; stands for the Id of an item the counter is attached to. Example: &lt;em&gt;Counter-11.cshtml&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lot of code refactoring&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Plans for the next release (around mid/end-April 2011)&lt;/strong&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Editing content item menu associations&lt;/strong&gt; on item edit/creation screen&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-column sub-items layout &amp;ndash; &lt;/strong&gt;dividing children into multiple lists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Menu item position auto-creation&lt;/strong&gt; based on existing items&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Menu item listing UI&lt;/strong&gt; improvement and tweaks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance improvements&lt;/strong&gt; by utilizing caching engine where possible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More styling options for StyledMenuWidget&lt;/strong&gt; &amp;ndash; borders, padding, margins, custom CSS, top menu level alignment (left/right/center)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Refactoring &amp;ndash; group and divide the features into separate features - &lt;/strong&gt;I just didn't have time to&amp;nbsp;do this, as OMC deadline was nearby (and being left with the totally broken build few hours before wasn't the thing I dreamt of&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/df3da1739b0e_F594/wlEmoticon-smile_2.png" /&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hope you&amp;rsquo;ll find it useful in your Orchard projects! I&amp;rsquo;m going to update my blog to Orchard 1.1 as soon as it arrives to utilize this nice new feature. I&amp;rsquo;d be very glad for any feedback so I could make this module better and better&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/df3da1739b0e_F594/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Sun, 03 Apr 2011 20:05:02 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/featuring-orchard-advanced-menu</guid></item><item><title>SQL Server 2008: Reverting accidental delete/update without recent backup</title><link>http://www.szmyd.com.pl:80/blog/sql-server-2008-reverting-accidental-delete-update-without-recent-backup</link><description>&lt;p&gt;Recently I ran into a problem after accidentally clearing an important column in one of my DB tables. Ooops&amp;hellip; I was in a real hurry and haven&amp;rsquo;t thought about making a backup first&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-sadsmile" alt="Smutek" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/60958dbc8563_E53C/wlEmoticon-sadsmile_2.png" /&gt; Just a simple query, but also with simple, nasty error within... First thought &amp;ndash; I&amp;rsquo;m doomed! &lt;em&gt;I&amp;rsquo;m pretty sure many of you had the same situation once&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/60958dbc8563_E53C/wlEmoticon-smile_2.png" /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I had only a week old backup &amp;ndash; much has changed since, so it&amp;rsquo;s not an option to revert the whole week.&amp;nbsp; So I started digging for a solution&amp;hellip; And found one!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/60958dbc8563_E53C/wlEmoticon-smile_2.png" /&gt; My DB is running in Full Recovery mode, so maybe there&amp;rsquo;s a chance (&lt;em&gt;your DB has to run in this mode too for this solution to work&lt;/em&gt;):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create a Transaction Log-only backup now&lt;/strong&gt; (after the accident)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restore the old backup&lt;/strong&gt; (week old in my situation) &lt;strong&gt;using RESTORE WITH NORECOVERY option.&lt;/strong&gt; This option can be selected in &lt;strong&gt;Restore Wizard &amp;ndash;&amp;gt;&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;Options&lt;/strong&gt; screen (or specified in restoration script). &lt;em&gt;This ensures that DB will be restored from backup and won&amp;rsquo;t allow outside connections until we&amp;rsquo;re finished the whole restoration process.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restore the Transaction Log backup (created in 1.) to a point in time before the accidental update/delete happened. &lt;/strong&gt;You can choose the desired point in time in Restore Wizard, or (if you prefer the scripted way of doing things) use the WITH STOPAT &amp;lt;date&amp;gt; option. &lt;strong&gt;This time, choose RESTORE WITH RECOVERY option&lt;/strong&gt;, to make DB fully operational after restoration process.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;You may also need to check &lt;strong&gt;WITH REPLACE &lt;/strong&gt;option in 2. and 3. if your DB shouts with errors.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And everything returns back to normal, phew&amp;hellip;&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/60958dbc8563_E53C/wlEmoticon-smile_2.png" /&gt; HTH!&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description><pubDate>Mon, 28 Mar 2011 14:35:27 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/sql-server-2008-reverting-accidental-delete-update-without-recent-backup</guid></item><item><title>Incoming Warm-up module helps running Orchard on shared hosting</title><link>http://www.szmyd.com.pl:80/blog/incoming-warm-up-module-helps-running-orchard-on-shared-hosting</link><description>&lt;p&gt;Most of us doesn&amp;rsquo;t have the possibility to run Orchard on his own server machine. Using the shared hosting account is the cheapest and most common way to have your site up and running, but it has lots of drawbacks, especially in terms of &lt;strong&gt;performance &lt;/strong&gt;and &lt;strong&gt;first-load (cold-start) response times. &lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A while ago I wrote an &lt;a href="http://www.szmyd.com.pl/blog/running-orchard-on-shared-hosting" target="_blank"&gt;article&lt;/a&gt; on how to boost your Orchard instance cold-start times. Most of the solutions to this issue unfortunately require you to have access to IIS Management Console, which isn&amp;rsquo;t always possible.&lt;/p&gt;
&lt;p&gt;Here comes the &lt;strong&gt;Orchard.Warmup&lt;/strong&gt; module, which will arrive with the incoming Orchard release. As application response times are crucial in terms of UX, this module will allow your site to be responsive even when your AppPool gets recycled! &lt;em&gt;You&amp;rsquo;d be able to quickly serve your visitors the cached versions of pages you want, until your application loads fully in the background. When that happens, everything returns to normal&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/104ae198676b_A6D1/wlEmoticon-smile_2.png" /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="http://orchard.codeplex.com/discussions/242228" target="_blank"&gt;this thread&lt;/a&gt;, where &lt;strong&gt;Renaud Paquay&lt;/strong&gt; from The Orchard Team describes the idea in greater detail.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Thu, 24 Mar 2011 11:10:19 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/incoming-warm-up-module-helps-running-orchard-on-shared-hosting</guid></item><item><title>The whole truth about CS studies</title><link>http://www.szmyd.com.pl:80/blog/the-whole-truth-about-cs-studies</link><description>&lt;p&gt;It&amp;rsquo;s so true, that I couldn&amp;rsquo;t help myself posting this&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/The-whole-truth-about-CS_F9AF/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/The-whole-truth-about-CS_F9AF/196338_154790191247969_100001509667558_334722_1419322_n_2.jpg"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="196338_154790191247969_100001509667558_334722_1419322_n" border="0" alt="196338_154790191247969_100001509667558_334722_1419322_n" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/The-whole-truth-about-CS_F9AF/196338_154790191247969_100001509667558_334722_1419322_n_thumb.jpg" width="398" height="423" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What do you think about that?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Is it university CS programmes that lag behind the real-world needs or new wave of students who believe CS courses to be a longer version of a (Java/.NET/PHP/whatever) programming tutorial and don&amp;rsquo;t care about the principles?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Wed, 23 Mar 2011 16:52:44 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/the-whole-truth-about-cs-studies</guid></item><item><title>Customizing Orchard shapes</title><link>http://www.szmyd.com.pl:80/blog/customizing-orchard-shapes</link><description>&lt;p&gt;Shapes are the basic building blocks of Orchard UI. They can be easily created and further reused by just putting an appropriate .cshtml file in your module /Views folder. This is nicely described &lt;a href="http://www.orchardproject.net/docs/Accessing-and-rendering-shapes.ashx" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://www.szmyd.com.pl/blog/using-shapes-as-html-helpers-in-orchard" target="_blank"&gt;here&lt;/a&gt;. But what if you&amp;rsquo;d want to arm your shape with some more fancy logic (eg. let them contain other shapes/objects, make them auto-wrapped with some Html tags, allow fine-grained overriding and such)? I&amp;rsquo;ll try to show you how to get the most from your Orchard shapes.&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-weight: bold;"&gt;Creating a custom IShapeTableProvider&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This is the main extension points for adding some custom logic to shapes. What&amp;rsquo;s the most important thing &amp;ndash; &lt;em&gt;not only your shapes&lt;/em&gt;! You can also alter the behavior of existing ones &amp;ndash; cool&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/f251733f5cb7_D3FC/wlEmoticon-smile_2.png" /&gt;! Basically, you are able to eg. add custom wrappers, class names, attributes, fire some custom logic on shape lifetime events and so on.&lt;/p&gt;
&lt;p&gt;The place everything happens in is the &lt;strong&gt;Discover(ShapeTableBuilder builder)&lt;/strong&gt; method. You operate on the provided &lt;em&gt;builder&lt;/em&gt; object to create all shapes&amp;rsquo; customizations. The basic structure looks like this:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;MyShapes &lt;/span&gt;: &lt;span style="color: #2b91af;"&gt;IShapeTableProvider &lt;/span&gt;{
    &lt;span style="color: blue;"&gt;public void &lt;/span&gt;Discover(&lt;span style="color: #2b91af;"&gt;ShapeTableBuilder &lt;/span&gt;builder)
    {
        builder.Describe(&lt;span style="color: #a31515;"&gt;"MyShape"&lt;/span&gt;)
	    .Configure(descriptor =&amp;gt; { })
            .OnCreated(context =&amp;gt; { })
            .OnCreating(context =&amp;gt; { })
            .OnDisplayed(context =&amp;gt; { })
            .OnDisplaying(context =&amp;gt; { });
    }
}
&lt;/pre&gt;
&lt;p&gt;As you can see the builder adds a nice, fluent interface for specifying the necessary stuff. First, you have to tell the builder which shape you&amp;rsquo;d like to alter by using a &lt;strong&gt;Describe()&lt;/strong&gt; method. &amp;ldquo;&lt;em&gt;MyShape&lt;/em&gt;&amp;rdquo; name I provided corresponds to &lt;em&gt;/Views/MyShape.cshtml&lt;/em&gt; shape file. &lt;strong&gt;The way shape names are constructed from the corresponding .cshtml file names is described in detail &lt;/strong&gt;&lt;a href="http://www.orchardproject.net/docs/Accessing-and-rendering-shapes.ashx" target="_blank"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; (&lt;em&gt;section &amp;ldquo;From template file name to shape name&amp;rdquo;).&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, you are free to add your own logic inside one or more of the five provided methods. For each of those methods you can specify a delegate (or lambda/anonymous method as shown above) which will get called at an appropriate moment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Configure &amp;ndash; &lt;/strong&gt;used to add some config options to your shape. &lt;em&gt;Mostly used to define wrappers (other shapes that wrap your shape) via &lt;strong&gt;descriptor.Wrappers&lt;/strong&gt; collection.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OnCreating&lt;/strong&gt; &amp;ndash; called when your shape is about to be created. &lt;em&gt;This event is mostly used for providing some custom shape construction info, like &lt;strong&gt;context.ShapeType (the type of object you want to be the base type of this shape &amp;ndash; nice if you&amp;rsquo;d like to add some custom properties to the shape) &lt;/strong&gt;or context.Behaviors (collection of IClayBehavior implementations for defining behavior when accessing shape members - pretty low-level stuff). &lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OnCreated&lt;/strong&gt; &amp;ndash; called when your shape is fully created, but not pushed to display yet. &lt;em&gt;Generally, all display structure is defined here (eg. shape zones, startup items, child items placement and such) &lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OnDisplaying&lt;/strong&gt; &amp;ndash; called when your shape is about to be displayed.&lt;em&gt; Mainly used for adding custom CSS classes (via context.Shape.Classes) or defining shape alternates to allow fine-grained overriding by your module users. What are shape alternates is described &lt;a href="http://www.orchardproject.net/docs/Accessing-and-rendering-shapes.ashx" target="_blank"&gt;here&lt;/a&gt;. &lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OnDisplayed &lt;/strong&gt;&amp;ndash; called when your shape Html just got rendered.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Next, you can operate on the provided context object to add necessary customizations. That&amp;rsquo;s it!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/f251733f5cb7_D3FC/wlEmoticon-smile_2.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The most important thing - you can access the corresponding dynamic Shape object by &lt;em&gt;context.Shape&lt;/em&gt;. The Shape property is &lt;span style="text-decoration: underline;"&gt;not&lt;/span&gt; available in&lt;em&gt; OnCreating&lt;/em&gt; event though (for obvious reasons).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are more methods, of course, but these are the &lt;strong&gt;most&lt;/strong&gt; useful ones. In most cases you won&amp;rsquo;t ever need to use the others.&lt;/p&gt;
&lt;p&gt;As an example I&amp;rsquo;d advise you to take a look at &lt;a href="http://orchard.codeplex.com/SourceControl/changeset/view/fe55d6737a3e#src%2fOrchard.Web%2fCore%2fShapes%2fCoreShapes.cs" target="_blank"&gt;CoreShapes.cs&lt;/a&gt;, located in Orchard.Core/Shapes. It contains the definitions for the most common shapes and nice examples of how you can customize your own shapes!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/f251733f5cb7_D3FC/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Wed, 23 Mar 2011 16:03:17 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/customizing-orchard-shapes</guid></item><item><title>WDI2011 conference site runs on Orchard</title><link>http://www.szmyd.com.pl:80/blog/wdi2011-conference-site-runs-on-orchard</link><description>&lt;p&gt;Had a hard work for a last few days rewriting the whole existing &lt;a href="http://www.wdi2011.pl" target="_blank"&gt;WDI2011&lt;/a&gt; conference site to Orchard. Works like a charm so I think it was worth that&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/WDI2011-Conference-site-runs-on-Orchard_6146/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;As I had to assign some time to that (and, unfortunately, this resource is highly limited&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Puszczam oczko" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/WDI2011-Conference-site-runs-on-Orchard_6146/wlEmoticon-winkingsmile_2.png" /&gt;) - the planned releases (refreshed Hierarchical Menu and the new one - &lt;em&gt;Frooth&lt;/em&gt; &amp;ndash; dynamic layout platform) will be delayed to Tuesday/Wednesday next week. I apologize for that&amp;hellip; But I can also promise you won&amp;rsquo;t be disappointed with the incoming bits!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/WDI2011-Conference-site-runs-on-Orchard_6146/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;An I&amp;rsquo;d be happy to invite those of you visiting Warsaw &lt;span style="text-decoration: underline;"&gt;at the end of March (30-31)&lt;/span&gt; to come and join us at the annual &lt;a href="http://www.wdi2011.pl" target="_blank"&gt;WDI 2011&lt;/a&gt; conference. &lt;em&gt;WDI is the biggest student-oriented (but not only) IT conference in Poland. This year the conference is being held at the Warsaw University of Technology.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description><pubDate>Sat, 19 Mar 2011 06:02:57 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/wdi2011-conference-site-runs-on-orchard</guid></item><item><title>New Hierarchical Menu coming soon - features</title><link>http://www.szmyd.com.pl:80/blog/new-hierarchical-menu-coming-soon-features</link><description>&lt;p&gt;I&amp;rsquo;m working hard to deliver the next release of Hierarchical Menu, which will arrive soon (as the deadline for OMC is nearby&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Puszczam oczko" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/befe67daa921_E3D6/wlEmoticon-winkingsmile_2.png" /&gt;). I&amp;rsquo;d like to list some new features most of which many of you asked for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Custom menus&lt;/strong&gt; &amp;ndash; &lt;em&gt;the ability to create your own menus from Dashboard, in addition to existing, hardcoded ones - &amp;ldquo;main&amp;rdquo; and &amp;ldquo;admin&amp;rdquo;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pre-filling the menu with existing items&lt;/strong&gt; &amp;ndash; it will allow you to pre-fill the custom menu with existing routable items in one click (and save time). &lt;em&gt;You could further customize the menu (delete, modify items) as you wish&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/befe67daa921_E3D6/wlEmoticon-smile_2.png" /&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New, styled and scripted menu widget&lt;/strong&gt; &amp;ndash; in addition to the current plain one.&lt;em&gt; Many of you had problems with proper styling the hierarchy, so I added the pre-configured widget with some GUI-based display customization properties. It&amp;rsquo;s intended for those of you who don&amp;rsquo;t want to deal with styling and scripting.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Main menu as a widget&lt;/strong&gt; &amp;ndash; the new release will replace the hardcoded main menu with a widget, so you&amp;rsquo;d be able to customize/remove/replace it from Dashboard.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexible menu localization&lt;/strong&gt; &amp;ndash; you&amp;rsquo;d be able to specify the menu item names for different cultures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Menu item visibility &amp;ndash;&lt;/strong&gt; allowing you to state whether the item should be visible/invisible when displaying in menus. This is mainly for breadcrumbs widget purpose so you&amp;rsquo;d be able to hide item in the menu (to keep menu concise), but make it show in the breadcrumbs path.&lt;em&gt; &lt;strong&gt;I&amp;rsquo;m thinking about this feature right now whether to add it or not.&lt;/strong&gt; Why? There are some issues:&lt;/em&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;What to do with child items?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Would it bring the unnecessary complexity and further problems? This can be achievable by just having two defined menus &amp;ndash; one for display (shorter) and one for breadcrumbs (full). I guess this is much cleaner though.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tweaked &amp;ldquo;Recently seen&amp;rdquo; widget &lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Restricting the number of items displayed&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Option to display the number of views&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scoping the view counter used&lt;/strong&gt; &amp;ndash; you&amp;rsquo;d be able to choose one of the following: &lt;em&gt;per-session&lt;/em&gt;, &lt;em&gt;per-user&lt;/em&gt; and &lt;em&gt;per-site&lt;/em&gt; view counters&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tweaked &amp;ldquo;Menu&amp;rdquo; widget&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Restricting levels displayed per-widget&lt;/strong&gt; &amp;ndash; as opposed to per-menu atm,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choosing the root node for menu display&lt;/strong&gt; &amp;ndash; you&amp;rsquo;d be able to select one of the existing items as the display root to restrict the displayed menu to only the subset of the whole (the selected item&amp;rsquo;s children).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;d like to thank all of you for a lot of feedback on using the Hierarchical Menu module! It made the feature selection for the upcoming release much easier&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/befe67daa921_E3D6/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;My special thanks go to: &lt;em&gt;Olin&lt;/em&gt;, &lt;em&gt;Skywalker&lt;/em&gt;,&lt;em&gt; tobias&lt;/em&gt; and &lt;em&gt;John Tarbox&lt;/em&gt; for the very elaborate feedback on the subject.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Sun, 06 Mar 2011 15:58:45 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/new-hierarchical-menu-coming-soon-features</guid></item><item><title>Orchard cool new feature - Recipes</title><link>http://www.szmyd.com.pl:80/blog/orchard-cool-new-feature-recipes</link><description>&lt;p&gt;I&amp;rsquo;ve just came across a new feature which, I suppose, will be ready for the upcoming Orchard 1.1 release &amp;ndash; the Recipes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It allows you to describe the startup configuration of Orchard and brew your own environment just by defining the necessary setup steps in simple XML. Cool!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Orchard-cool-new-featureRecipes_E154/wlEmoticon-smile_2.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Apart from the manifest part (the &lt;em&gt;&amp;lt;Recipe&amp;gt;&lt;/em&gt; section) containing info about recipe you can define everything you need for your Orchard application to successfully set up:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Modules needed&lt;/strong&gt; (the &lt;em&gt;&amp;lt;Module&amp;gt;&lt;/em&gt; section). &lt;em&gt;The coolest thing about this section is that you can define even the modules &lt;span style="text-decoration: underline;"&gt;not existing&lt;/span&gt; in the installation package and those will be &lt;span style="text-decoration: underline;"&gt;automatically downloaded and installed from Orchard Gallery&lt;/span&gt; (or other repositories of your own you may optionally specify)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Features enabled/disabled by default&lt;/strong&gt; (the &amp;lt;Feature&amp;gt; section)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Themes available &lt;/strong&gt;(the &lt;em&gt;&amp;lt;Theme&amp;gt;&lt;/em&gt; section)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content types and parts&lt;/strong&gt; (&amp;lt;&lt;em&gt;Metadata&amp;gt;&lt;/em&gt; section with &lt;em&gt;&amp;lt;Types&amp;gt;&lt;/em&gt; and &lt;em&gt;&amp;lt;Parts&amp;gt;&lt;/em&gt; subsections)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Default site settings&lt;/strong&gt; (&amp;lt;&lt;em&gt;Settings&amp;gt;&lt;/em&gt; section)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Migrations to run&lt;/strong&gt; &lt;em&gt;(&amp;lt;Migration&amp;gt;&lt;/em&gt; section). &lt;em&gt;You can specify for which features the migrations should be run (* by default, which means all)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Commands to invoke&lt;/strong&gt; &lt;em&gt;(&amp;lt;Command&amp;gt;&lt;/em&gt; section).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As an example of such recipe take a look at the one used for setting up a &lt;a href="http://orchard.codeplex.com/SourceControl/changeset/view/622d58e5caae#src%2fOrchard.Web%2fModules%2fOrchard.Setup%2fRecipes%2fdefault.recipe.xml" target="_blank"&gt;default environment&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I guess this gives a&lt;strong&gt; huge&lt;/strong&gt; boost for everyone building highly customized applications on Orchard, as the whole setup phase can be clearly defined. So you can simply say &amp;ldquo;goodbye&amp;rdquo; to hours spent on setting up your Orchard box for the n-th time!&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Orchard-cool-new-featureRecipes_E154/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dotnetshoutout.com/Orchard-cool-new-feature-Recipes" rev="vote-for"&gt;&lt;img style="border: 0px;" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fwww.szmyd.com.pl%2Fblog%2Forchard-cool-new-feature-recipes%3Fsms_ss%3Ddotnetshoutout%26at_xt%3D4d6e663b4f2e0daa%252C0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.szmyd.com.pl%2fblog%2forchard-cool-new-feature-recipes%3fsms_ss%3ddotnetkicks"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.szmyd.com.pl%2fblog%2forchard-cool-new-feature-recipes%3fsms_ss%3ddotnetkicks%26border%3DEEEEEE%26bgcolor%3D0066CC%26cbgcolor%3DFFFFCC" /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 02 Mar 2011 15:32:06 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/orchard-cool-new-feature-recipes</guid></item><item><title>Running Orchard on shared hosting</title><link>http://www.szmyd.com.pl:80/blog/running-orchard-on-shared-hosting</link><description>&lt;p&gt;Trying to run Orchard on shared hosting can run you into many problems. There&amp;rsquo;s already been a long &lt;a href="http://orchard.codeplex.com/discussions/242228" target="_blank"&gt;discussion&lt;/a&gt; about that on Orchard discussion board. The main issue noticed is a long Orchard loading time, especially when accessing the site for the first time.&lt;/p&gt;
&lt;p&gt;Orchard is a very complex application which needs a lot of preparation stuff at startup. &lt;em&gt;Unfortunately shared hosting providers care the most about site density on their servers and do frequent AppPool restarts so to allow other sites to reuse the server resources. Every AppPool restart forces Orchard to load itself from scratch and do the so-called &amp;ldquo;cold-start&amp;rdquo;.&lt;/em&gt; Also, on less frequently visited sites the AppPool will be additionally recycled because of long idle times.&lt;/p&gt;
&lt;p&gt;There are two approaches to lessen the impact of those on your visitors&amp;rsquo; experience (&lt;em&gt;of course if AppPool recycling is the case&lt;/em&gt;):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use ping service&lt;/strong&gt; to shorten the application idle time. It will ensure that your site is constantly running by pinging the specified URL in specified time periods and will automatically force cold-starts. Some of such services were mentioned in &lt;a href="http://orchard.codeplex.com/discussions/242228" target="_blank"&gt;this thread&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use &lt;a href="http://www.iis.net/download/ApplicationWarmup" target="_blank"&gt;Application Warm-Up&lt;/a&gt; IIS plugin.&lt;/strong&gt; This is the much better way as long as you have access to your site via IIS Management Console. &lt;strong&gt;In my opinion this is a must-have plugin!&lt;/strong&gt; It ensures the application gets a hot-start even when AppPool gets recycled. Basically it makes your application start before the first request arrives.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Hope you find it helpful&lt;img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Uśmiech" src="http://www.szmyd.com.pl/Media/BlogPs/Windows-Live-Writer/Running-Orchard-on-shared-hosting_F9ED/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description><pubDate>Tue, 01 Mar 2011 17:04:31 GMT</pubDate><guid isPermaLink="true">http://www.szmyd.com.pl:80/blog/running-orchard-on-shared-hosting</guid></item></channel></rss>
