﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.enkelmedia.se/rss.xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Umbraco bloggen, webbutveckling, design tips och ticks.</title>
    <link>https://www.enkelmedia.se/blogg/</link>
    <description>En blogg om webbutveckling och webbdesign med fokus på ASP.NET och Umbraco CMS.</description>
    <item>
      <guid isPermaLink="false">0e232797-72ee-420b-b6d6-82c7364f5c22</guid>
      <link>https://www.enkelmedia.se/blogg/2026/3/15/programmatically-create-umbraco-members-and-set-password?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Programmatically create Umbraco Members and set Password</title>
      <description>&lt;p&gt;Over the last months, I've been working on moving websites from Umbraco 13 up to Umbraco 17. I had a really hard time to find good documentation on how to work with Members so I figured I'll write a short blog post to fill some of the "gaps" I experienced in the documentation.&lt;/p&gt;
&lt;h2&gt;What is Member in Umbraco?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;Member&lt;/strong&gt; in Umbraco is an external or frontend user. In other words, this is the kind of account you would use for things like a customer area, intranet login, gated content, forums, and similar functionality on the public-facing site.&lt;/p&gt;
&lt;h2&gt;Working with Members programmatically&lt;/h2&gt;
&lt;p&gt;When working with Umbraco Members programmatically you need to familiarize your self with the &lt;em&gt;IMemberService &lt;/em&gt;and the &lt;em&gt;IMemberManager&lt;/em&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IMemberService is used to work with the IMember object, set username, email and update custom properties.&lt;/li&gt;
&lt;li&gt;IMemberManager is used to perform login, get current member and set password.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is a code sample that will create a member programmatically and set the password programmatically.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class MemberRegistrationService
{
    private readonly IMemberService _memberService;
    private readonly IMemberManager _memberManager;
    private readonly IPasswordHasher _passwordHasher;

    public MemberRegistrationService(
        IMemberService memberService,
        IMemberManager memberManager,
        IPasswordHasher passwordHasher
        )
    {
        _memberService = memberService;
        _memberManager = memberManager;
        _passwordHasher = passwordHasher;
    }

    public async Task&amp;lt;IMember&amp;gt; CreateMemberAsync(string email, string password, string name)
    {
        var member = _memberService.CreateMember(
            email,
            email,
            name,
            &amp;quot;Member&amp;quot;); // or Member.ModelTypeAlias with ModelsBuilder
        
        member.IsApproved = true;

        _memberService.Save(member);

        // Optionally add to a role
        _memberService.AssignRole(member.Id, &amp;quot;Member&amp;quot;); 

        // Set password
        var memberIdentity = await _memberManager.FindByIdAsync(member.Id.ToString());
        var passwordResult = await _memberManager.AddPasswordAsync(memberIdentity!, password);

        // Alternative way of setting password
        member.RawPasswordValue = _passwordHasher.HashPassword(password);

        return member;
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sun, 15 Mar 2026 14:19:20 Z</pubDate>
      <a10:updated>2026-03-15T14:19:20Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e18b61fa-95e2-4784-b8bd-ca9ee1f89eb4</guid>
      <link>https://www.enkelmedia.se/blogg/2024/4/23/testing-lit-components-created-with-typescript-and-vite-using-web-test-runner?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Testing Lit components created with TypeScript and Vite using Web Test Runner</title>
      <description>&lt;p&gt;With only about a month left until the initial release of Umbraco 14 aka Bellissima and the new Backoffice, I'm working hard to migrate/update my email package &lt;a rel="noopener" href="https://www.newsletterstudio.org" target="_blank"&gt;Newsletter Studio&lt;/a&gt;. This package makes it possible to create and design emails to send as campaigns or use as transactional emails.&lt;/p&gt;
&lt;h2&gt;The new Backoffice&lt;/h2&gt;
&lt;p&gt;The new Umbraco backoffice is based on Web Components and implemented using Lit and TypeScript. Web Components and Lit were new technologies to me when I started the migration, and it took quite some learning to get up to speed, but it has been a fun journey.&lt;/p&gt;
&lt;p&gt;My package is quite complicated so I figured I needed a way to run different kinds of tests (unit tests, end-2-end tests). As always, I looked at the &lt;a rel="noopener" href="https://github.com/umbraco/Umbraco.CMS.Backoffice" target="_blank"&gt;Umbraco source code&lt;/a&gt; to find some inspiration. I must say that it has been very interesting and I've learned a lot from looking at how the great minds at Umbraco HQ have done things.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/jrfn0m5p/web-test-runner.png?rmode=max&amp;amp;width=864&amp;amp;height=516" alt="" width="864" height="516"&gt;&lt;/p&gt;
&lt;h2&gt;Web Test Runner&lt;/h2&gt;
&lt;p&gt;When it comes to testing they've chosen to use &lt;a rel="noopener" href="https://modern-web.dev/docs/test-runner/overview/" target="_blank"&gt;Web Test Runner&lt;/a&gt; which is a modern test runner that will execute tests in a real browser. Many other test runners will execute in a Node environment and "mock" the browser DOM (which is not an easy thing to do), Web Test Runner will execute all the unit tests in a real browser which saves us a lot of hassle.&lt;/p&gt;
&lt;p&gt;Now I've set up my project to be ready for the new &lt;a rel="noopener" href="https://web.dev/blog/import-maps-in-all-modern-browsers" target="_blank"&gt;import map&lt;/a&gt; feature in modern browsers. This feature basically allows us to write JavaScript code imports like:"import {Thing} from 'lib';" and then tell the browser which file/URL to load when it sees "lib".&lt;/p&gt;
&lt;p&gt;When using TypeScript and Vite it's quite easy to set this up using TypeScript paths, Matt Brailsford wrote a a &lt;a rel="noopener" href="https://dev.to/mattbrailsford/simplifying-imports-with-typescript-path-aliases-in-umbraco-v14-301g" target="_blank"&gt;great article&lt;/a&gt; about this that I highly recommend reading.&lt;/p&gt;
&lt;p&gt;Now, when I added Web Test Runner to my project I started by trying to use the same dependencies as Bellissima but I had a really hard time getting my imports to work in the browser that executed the tests. The &lt;a rel="noopener" href="https://www.npmjs.com/package/@web/test-runner" target="_blank"&gt;@web/test-runner&lt;/a&gt; uses &lt;a rel="noopener" href="https://www.npmjs.com/package/@web/dev-server" target="_blank"&gt;@web/dev-server&lt;/a&gt; to serve code to the browser during the test runs. Since we're using TypeScript the recommended approach seems to be to use &lt;a href="https://www.npmjs.com/package/@web/dev-server-esbuild"&gt;@web/dev-server-esbuild&lt;/a&gt; and since we want import maps we would also need &lt;a href="https://www.npmjs.com/package/@web/dev-server-import-maps"&gt;@web/dev-server-import-maps&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Not that easy&lt;/h2&gt;
&lt;p&gt;Setting this up basically makes us have two different build pipelines, one with Vite and another one for the Web Test Runner. I spent a fair amount of time trying to get this to work but kept getting an error in the test run browser: "Error: Failed to fetch dynamically imported module". I think I looked at all websites on the internet 🤥 but I could not find a solution. Obviously, it works since the Bellissima project uses this approach, but since I was frustrated I started to look for alternatives.&lt;/p&gt;
&lt;h2&gt;Another approach&lt;/h2&gt;
&lt;p&gt;Luckily this brought my attention to the plugin &lt;a rel="noopener" href="https://www.npmjs.com/package/@remcovaes/web-test-runner-vite-plugin" target="_blank"&gt;@remcovaes/web-test-runner-vite-plugin&lt;/a&gt;. This plugin will reuse all the configuration from the Vite setup (including the Paths from tsconfig.json which had to be duplicated in the Web Test Runner configuration) and after installing it, my tests were working in 2 minutes. After spending many hours debugging I could not believe it was working, I was actually thinking: "No, this can't be right, it can't be this easy" 😆. But it was. The code in my web-test-runner.config.mjs file went from 50 lines to 15 lines and the experience was really nice.&lt;/p&gt;
&lt;p&gt;Now I have a nice setup to be able to unit test my web components and TypeScript code. I've shared a working example of the setup in this &lt;a rel="noopener" href="https://github.com/enkelmedia/vite-lit-web-test-runner" target="_blank"&gt;github repository&lt;/a&gt; if anyone else is struggling with the same problems.&lt;/p&gt;</description>
      <pubDate>Mon, 22 Apr 2024 23:07:07 Z</pubDate>
      <a10:updated>2024-04-22T23:07:07Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">d5f0e3fd-ad9c-4159-88b7-22edaae6e3bb</guid>
      <link>https://www.enkelmedia.se/blogg/2023/11/18/resources-for-umbraco-14-bellissima-new-backoffice?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Resources for Umbraco 14 Bellissima (new Backoffice)</title>
      <description>&lt;p&gt;The release of Umbraco 14 and the new Backoffice (aka Bellissima) is scheduled in May 2024. This release will be a major technical change in the way that developers extend the backoffice.&lt;/p&gt;
&lt;p&gt;Since Umbraco 14 is still a work in progress, as well as the &lt;a rel="noopener" href="https://docs.umbraco.com/umbraco-backoffice/" target="_blank"&gt;official documentation&lt;/a&gt;, I wanted to create this blog post to curate some of the content around this that I've found useful when getting up to speed. I will continue to add resources to this list, also feel free to &lt;a rel="noopener" href="https://twitter.com/markusjoha" target="_blank"&gt;let me know&lt;/a&gt; if you think that something should be added.&lt;/p&gt;
&lt;p&gt;This articles was last updated: 2024-04-03&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/ghdail3k/new-backoffice.png?width=1700" alt=""&gt;&lt;/p&gt;
&lt;p&gt;The new backoffice removes all the legacy dependencies on AngularJS and uses modern technologies like Web Components with &lt;a rel="noopener" href="https://lit.dev/" target="_blank"&gt;Lit&lt;/a&gt; and reactivity using &lt;a rel="noopener" href="https://rxjs.dev/" target="_blank"&gt;RxJS&lt;/a&gt;. I maintain several open-source packages and the &lt;a rel="noopener" href="http://www.newsletterstudio.org/" target="_blank"&gt;email package Newsletter Studio,&lt;/a&gt; so this is an exciting time. &lt;/p&gt;
&lt;h2&gt;Official Sources&lt;/h2&gt;
&lt;p&gt;The official source code and the official documentation are of course great places to start.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source code&lt;/strong&gt;&lt;br&gt;Reading the real source code is the real "source of truth"&lt;br&gt;&lt;a rel="noopener" href="https://github.com/umbraco/Umbraco.CMS.Backoffice" target="_blank"&gt;https://github.com/umbraco/Umbraco.CMS.Backoffice&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documentation&lt;/strong&gt; &lt;br&gt;The official docs for Bellissima contains a great "Getting started"-section and some useful tutorials.&lt;br&gt;&lt;a href="https://docs.umbraco.com/umbraco-backoffice/"&gt;https://docs.umbraco.com/umbraco-backoffice/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Umbraco UI-library&lt;/strong&gt;&lt;br&gt;Used in the current backoffice and even more in the new backoffice.&lt;br&gt;&lt;a href="https://github.com/umbraco/Umbraco.UI"&gt;https://github.com/umbraco/Umbraco.UI&lt;/a&gt; &lt;br&gt;
&lt;div&gt;
&lt;div&gt;&lt;a href="https://uui.umbraco.com"&gt;https://uui.umbraco.com&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Storybook&lt;/strong&gt;&lt;br&gt;The Storybook contains lots of examples and semi-structured documentation.&lt;br&gt;&lt;a href="https://apidocs.umbraco.com/v14/ui/"&gt;https://apidocs.umbraco.com/v14/ui/&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Video &amp;amp; Presentations&lt;/h2&gt;
&lt;p&gt;These videos are a great way to get the over all concepts but please be aware that since this is still work in progress some details in the older videos might not be accurate any more.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;UmbraCoffe - Bellissima&lt;br&gt;&lt;/strong&gt;Marcin and Callum talks with Richard Soeteman about his experience with the new backoffice while working on his packages Member Export, SEO Checker and Media Protect.&lt;br&gt;&lt;a rel="noopener" href="https://www.youtube.com/watch?v=COaq5oLRTvE" target="_blank" data-anchor="?v=COaq5oLRTvE"&gt;https://www.youtube.com/watch?v=COaq5oLRTvE&lt;/a&gt;&lt;strong&gt;&lt;br&gt;&lt;br&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Umbraco Kent Meetup, Jacob Overgaard from Umbraco HQ on Bellissima&lt;br&gt;&lt;/strong&gt;Great talk from one of the master minds behind the new Umbraco backoffice Jacob Overgaard. This video/presentation is a great explanation about the fundamentals about the new backoffice.&lt;br&gt;&lt;a rel="noopener" href="https://www.youtube.com/watch?v=SVpHFlKCJSw" target="_blank" data-anchor="?v=SVpHFlKCJSw"&gt;https://www.youtube.com/watch?v=SVpHFlKCJSw&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mounting your UI in New Backoffice, 2023&lt;br&gt;&lt;/strong&gt;Niels Lyngsø, recording from Community Teams Days at Umbraco 2023.&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;a href="https://www.youtube.com/watch?v=mxozXXPAALI"&gt;https://www.youtube.com/watch?v=mxozXXPAALI&lt;/a&gt; &lt;strong&gt;&lt;br&gt;&lt;br&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Practical adventures with Bellissima&lt;br&gt;&lt;/strong&gt;Nathan Woulfe, Package-wizard, Umbraco HQ talks about his experience with the initial migration of "his" Workflow-package to Umbraco 14. There is a preview version of the whole source code for &lt;a rel="noopener" href="https://github.com/umbraco/Umbraco.Workflow.Client.Preview/tree/main" target="_blank"&gt;Umbraco Workflow available on Github&lt;/a&gt; to serve as inspiration for other package developers.&lt;br&gt;&lt;a href="https://www.youtube.com/live/mrEQm-dgcFk?si=zVzv0NnaIvedQiBw&amp;amp;t=2368"&gt;https://www.youtube.com/live/mrEQm-dgcFk?si=zVzv0NnaIvedQiBw&amp;amp;t=2368&lt;/a&gt; &lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Exploring the new Backoffice&lt;/strong&gt;&lt;br&gt;Jacob Overgaard, CodeGarden 2023&lt;br&gt;&lt;a href="https://www.youtube.com/watch?v=P14r9Sr0ATI"&gt;https://www.youtube.com/watch?v=P14r9Sr0ATI&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Packages Question Time&lt;/strong&gt;&lt;br&gt;The new back office, 23rd of August 2023&lt;br&gt;&lt;a href="https://www.youtube.com/watch?v=5vRzEMzrIec"&gt;https://www.youtube.com/watch?v=5vRzEMzrIec&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lit overview with Michele Stieven | jsday 2022&lt;/strong&gt;&lt;br&gt;A great overview of Lit and its different building blocks.&lt;br&gt;&lt;a rel="noopener" href="https://www.youtube.com/watch?v=I9RbleMxxXw" target="_blank" data-anchor="?v=I9RbleMxxXw"&gt;https://www.youtube.com/watch?v=I9RbleMxxXw&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Starter kit&lt;/h2&gt;
&lt;p&gt;Kevin Jump has made a great starter kit (as a dotnet new template), you'll find it &lt;a rel="noopener" href="https://github.com/KevinJump/EarlyAdopters.Umbraco.Templates" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Andy Butland, Umbraco HQ&lt;/h2&gt;
&lt;p&gt;Andy works on some of the most popular Umbraco HQ-packages and has shared some of his learnings along the way.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Blog post series about Umbraco 14&lt;/strong&gt;&lt;br&gt;In a couple of blog posts, Andy shares his first experiences with Umbraco 14.&lt;br&gt;&lt;a href="https://www.andybutland.dev/2023/09/umbraco-14-package-migration.html"&gt;https://www.andybutland.dev/2023/09/umbraco-14-package-migration.html&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Umbraco 14-branch of Personalisation Groups&lt;/strong&gt;&lt;br&gt;Here we can follow the progress of getting the package to work in Umbraco 14.&lt;br&gt;&lt;a href="https://github.com/AndyButland/UmbracoPersonalisationGroupsCore/tree/feature/migrate-to-14"&gt;https://github.com/AndyButland/UmbracoPersonalisationGroupsCore/tree/feature/migrate-to-14&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Kevin Jump aka. mr. uSync&lt;/h2&gt;
&lt;p&gt;Not sure if Kevin needs any introduction to the community as he is the creator of the mighty popular uSync-package that I've used on almost all my websites for as long as I can remember.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dev.to articles: Early Adopter's Guide Umbraco v14&lt;br&gt;&lt;/strong&gt;A great series of blog posts about how to extend the new backoffice with a great visual overview of the most common extension points. &lt;br&gt;&lt;a rel="noopener" href="https://dev.to/kevinjump/series/26221" target="_blank"&gt;https://dev.to/kevinjump/series/26221&lt;/a&gt;&lt;br&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dev.to articles: Property Editors&lt;/strong&gt;&lt;br&gt;How to build a custom property editor for Umbraco Bellissima&lt;br&gt;&lt;a href="https://dev.to/kevinjump/series/26366"&gt;https://dev.to/kevinjump/series/26366&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dev.to articles: Trees&lt;/strong&gt;&lt;br&gt;Great read about how to extend Umbraco 14 with a custom tree.&lt;br&gt;&lt;a rel="noopener" href="https://dev.to/kevinjump/series/26505" target="_blank"&gt;https://dev.to/kevinjump/series/26505&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dev.to articles: Server to client communication&lt;/strong&gt;&lt;br&gt;Bellissima embraced OpenAPI and Swagger, in the article Kevin explain how to setup C# controllers and communicate between frontend and backen.&lt;br&gt;&lt;a rel="noopener" href="https://dev.to/kevinjump/series/26248" target="_blank"&gt;https://dev.to/kevinjump/series/26248&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dev.to article: Upgrade preview releases&lt;/strong&gt;&lt;br&gt;A great little guide on how to upgrade your project to the latest preview-release.&lt;br&gt;&lt;a href="https://dev.to/kevinjump/early-adopters-guide-to-umbraco-v14-upgrade-preview-releases-39oj"&gt;https://dev.to/kevinjump/early-adopters-guide-to-umbraco-v14-upgrade-preview-releases-39oj&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dev.to article: uSync to v14&lt;/strong&gt;&lt;br&gt;It's almost like we're getting to read Kevin's notes during his initial work of getting uSync to compile and almost run on Umbraco 14.&lt;br&gt;&lt;a href="https://dev.to/kevinjump/usync-to-v14-a-journey-14ho"&gt;https://dev.to/kevinjump/usync-to-v14-a-journey-14ho&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;uSync v14 source&lt;/strong&gt;&lt;br&gt;Here we can follow the progress inside the uSync GitHub repository.&lt;br&gt;&lt;a href="https://github.com/KevinJump/uSync/tree/v14/convert"&gt;https://github.com/KevinJump/uSync/tree/v14/convert&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Starter Kit&lt;/strong&gt;&lt;br&gt;A "dotnet new" template that can be used to setup a package development project for Umbraco v14+. &lt;a rel="noopener" href="https://github.com/KevinJump/EarlyAdopters.Umbraco.Templates" target="_blank"&gt;https://github.com/KevinJump/EarlyAdopters.Umbraco.Templates&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Sir. Lee Kelleher&lt;/h2&gt;
&lt;p&gt;Lee is the man behind the Contentment-package that I use almost every day. I have seen some &lt;a rel="noopener" href="https://umbracocommunity.social/@lee/110945741357688001" target="_blank"&gt;hints on Mastodon&lt;/a&gt; that he has been trying out the Umbraco 14-previews.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Contentment source code&lt;br&gt;&lt;/strong&gt;In the "dev/wip/bellissima"-branch we can see some hits of what Lee is working on.&lt;br&gt;&lt;a href="https://github.com/leekelleher/umbraco-contentment/tree/dev/wip/bellissima"&gt;https://github.com/leekelleher/umbraco-contentment/tree/dev/wip/bellissima&lt;/a&gt;&lt;a href="https://github.com/leekelleher/umbraco-contentment/tree/dev/wip/bellissima"&gt; &lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;a href="https://github.com/leekelleher/umbraco-contentment"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Blog post about the first steps&lt;/strong&gt;&lt;br&gt;
&lt;p class="MsoPlainText"&gt;Lee shares his thoughts about the approach to the new version of the package - to continue with multi-targeting or to "start fresh".&lt;br&gt;&lt;a href="https://dev.to/leekelleher/contentment-for-bellissima-199d"&gt;https://dev.to/leekelleher/contentment-for-bellissima-199d&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Matt Brailsford&lt;/h2&gt;
&lt;p&gt;A well-known community member and nowadays Umbraco HQ member ever since the Vendr package was acquired by HQ and rebranded to Umbraco Commerce. Matt has been writing some very nice articles about his v14 journey.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simplifying Imports with TypeScript Path Aliases&lt;/strong&gt; About how to use TypeScript Path Aliases to make your code cleaner and easier to refactor.&lt;br&gt;&lt;a href="https://dev.to/mattbrailsford/simplifying-imports-with-typescript-path-aliases-in-umbraco-v14-301g"&gt;https://dev.to/mattbrailsford/simplifying-imports-with-typescript-path-aliases-in-umbraco-v14-301g&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Creating your own UI extension points in Umbraco v14&lt;br&gt;&lt;/strong&gt;Matt has started a series on the topic of creating custom extension points for a package.&lt;br&gt;&lt;a href="https://dev.to/mattbrailsford/creating-your-own-ui-extension-points-in-umbraco-v14-part-1-the-basics-568h"&gt;https://dev.to/mattbrailsford/creating-your-own-ui-extension-points-in-umbraco-v14-part-1-the-basics-568h&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Richard Soeteman, SEO Checker, CMS Import and more&lt;/h2&gt;
&lt;p&gt;It feels like Richard has been building Umbraco packages since the day Umbraco was initially released and I just spotted that I have a new blog that I'm eager to follow.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Umbraco 14 auto install&lt;/strong&gt;&lt;br&gt;In this blog post, Richard share a Powershell script to automatically install Umbraco 14 and get it ready for package development.&lt;br&gt;&lt;a href="https://richardsoeteman.net/blog/auto-install-latest-umbraco-14/"&gt;https://richardsoeteman.net/blog/auto-install-latest-umbraco-14/&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Using ChatGPT to convert backoffice language files&lt;/strong&gt;&lt;br&gt;In this awesome article Richard shares how he used ChatGTP to automatically convert the backoffice language files in to the new Umbraco Bellissima format.&lt;br&gt;&lt;a rel="noopener" href="https://richardsoeteman.net/blog/converting-backoffice-language-files-using-chatgpt/" target="_blank"&gt;https://richardsoeteman.net/blog/converting-backoffice-language-files-using-chatgpt/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Community threads worth checking out&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://discord.com/channels/869656431308189746/1201903877721698395" target="_blank"&gt;Discord-question about authentication for custom controllers&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;More to come&lt;/h2&gt;
&lt;p&gt;I'm really looking forward to reading more from other community members that is on the same adventure as me and I will of course make sure to share parts of my own journey. I will also put some of my efforts into creating PRs for the &lt;br&gt;&lt;a rel="noopener" href="https://docs.umbraco.com/umbraco-backoffice/" target="_blank"&gt;official documentation&lt;/a&gt; as I think that this will bring the most value to the community.&lt;/p&gt;
&lt;p&gt;If you have examples of content that you think should be listed here - please &lt;a rel="noopener" href="https://twitter.com/markusjoha" target="_blank"&gt;reach out&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sat, 18 Nov 2023 11:21:04 Z</pubDate>
      <a10:updated>2023-11-18T11:21:04Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">25b9c351-6be1-4b64-bdb6-6dd24d48a0ba</guid>
      <link>https://www.enkelmedia.se/blogg/2023/11/11/vs-code-extensions-for-the-best-experiance?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>VS Code extensions for the best experiance</title>
      <description>&lt;p&gt;I have been thinking about writing a couple of lines about my VS Code setup and finally, it's time. As a C#-focused developer, I'm a big fan of both full-blown Visual Studio and JetBrains Rider but I find myself using VS Code more and more. Especially for note-taking and working with markdown. In this blog post, I'll share my favorite extensions and some tips that will hopefully take your documentation and markdown work to the next level.&lt;/p&gt;
&lt;h2&gt;C# and .NET&lt;/h2&gt;
&lt;p&gt;I tend to only use VS Code for light-weight changes, small proof of concepts, and so on but I must say that the experience is getting better and better. &lt;/p&gt;
&lt;p&gt;Here are some of my favorite extensions for C# and .NET:&lt;/p&gt;
&lt;h3&gt;C# Dev Kit&lt;/h3&gt;
&lt;p&gt;Microsoft's latest tools for working with .NET solutions and C# and Razor in VS Code.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit" target="_blank" data-anchor="?itemName=ms-dotnettools.csdevkit"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;JetBrains Rider Dark Theme&lt;/h3&gt;
&lt;p&gt;I've spent many hours trying to find the right dark theme for VS Code. Since I also use Rider a lot, I ended up feeling that the best approach for me was to use the same, great color scheme in VS code as well.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=EdwinSulaiman.jetbrains-rider-dark-theme" target="_blank" data-anchor="?itemName=EdwinSulaiman.jetbrains-rider-dark-theme"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Notes&lt;/h2&gt;
&lt;p&gt;I tend to use VS Code a lot for writing documentation and taking notes in markdown files.&lt;/p&gt;
&lt;h3&gt;Draw.io VS Code Integration&lt;/h3&gt;
&lt;p&gt;I've been using a lot of different tools for diagrams, flow charts, and so on over the years and always felt that they were "too far from the source code". These days are gone. It was actually this extension that inspired me to finally write this blog post.&lt;/p&gt;
&lt;p&gt;With the draw.io-extension you can draw and embed diagrams into markdown files directly from VS Code, if you create a ".drawio.svg" file it will be stored as SVG and you can easily commit them into your source control and Github will even show your diagrams - this almost blew my mind!&lt;br&gt;&lt;br&gt;Just:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a file with the extension ".drawio.svg" for example test.drawio.svg&lt;/li&gt;
&lt;li&gt;Open the file in VS Code, add some stuff and save.&lt;/li&gt;
&lt;li&gt;Include in md file like so: ![Drawing](test.drawio.svg)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio" target="_blank" data-anchor="?itemName=hediet.vscode-drawio"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/w3zglthi/vscode-draw-io.png?rmode=max&amp;amp;width=1700&amp;amp;height=936" alt="" width="1700" height="936"&gt;&lt;/p&gt;
&lt;h3&gt;Markdown All in One&lt;/h3&gt;
&lt;p&gt;Great extension that brings shortcuts, auto completions, and other features to the markdown editing experience.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one" target="_blank" data-anchor="?itemName=yzhang.markdown-all-in-one"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Dendron Paste Image&lt;/h3&gt;
&lt;p&gt;This one is another "life server" that makes it super easy to paste images from the clipboard into a markdown file. Perfect in combination with &lt;a rel="noopener" href="https://getsharex.com/" target="_blank"&gt;ShareX&lt;/a&gt;, just grab screenshots, edit them, and paste them into the markdown.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=dendron.dendron-paste-image" target="_blank" data-anchor="?itemName=dendron.dendron-paste-image"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;HTML, Javascript &amp;amp; Typescript&lt;/h2&gt;
&lt;h3&gt;Lit-html&lt;/h3&gt;
&lt;p&gt;As an Umbraco-developer this is a must-have in the future when the new backoffice comes out. This extension brings syntax highlighting and other lit-related features.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=bierner.lit-html" target="_blank" data-anchor="?itemName=bierner.lit-html"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;br&gt;VS Code Import code&lt;/h3&gt;
&lt;p&gt;This great little extension will indicate the size added to your js-bundle when importing dependencies in your files.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost" target="_blank" data-anchor="?itemName=wix.vscode-import-cost"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h3&gt;Auto Rename Tag&lt;/h3&gt;
&lt;p&gt;Will automatically rename paired HTML/XML elements when you edit them in VS Code.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag" target="_blank" data-anchor="?itemName=formulahendry.auto-rename-tag"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Other tools&lt;/h2&gt;
&lt;h3&gt;&lt;br&gt;Material Icon Theme&lt;/h3&gt;
&lt;p&gt;This extensions brings these beautiful icons to the tree in VS Code, I was looking around and testing a lot of different options but I really understand why this one has over 20 million downloads as of now.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme" target="_blank" data-anchor="?itemName=PKief.material-icon-theme"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/hl4fj043/vs-code-icons.png?rmode=max&amp;amp;width=222&amp;amp;height=482" alt="" width="222" height="482"&gt;&lt;/p&gt;
&lt;h3&gt;Todo Tree&lt;/h3&gt;
&lt;p&gt;Looks for TODOs in your code base and adds a tree with todo-items from your code base.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree" target="_blank" data-anchor="?itemName=Gruntfuggly.todo-tree"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;YAML&lt;/h3&gt;
&lt;p&gt;Red Hat's extremely popular YAML extension brings highlighting and helps you write your YAML.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml" target="_blank" data-anchor="?itemName=redhat.vscode-yaml"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;PowerShell&lt;/h3&gt;
&lt;p&gt;Great extension when you need to create PowerShell-scripts, the experience with this extension in VS Coder is almost better than in the PowerShell ISE.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell?itemName=ms-vscode.PowerShell" target="_blank" data-anchor="?itemName=ms-vscode.PowerShell?itemName=ms-vscode.PowerShell"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;GitHub Actions&lt;/h3&gt;
&lt;p&gt;Makes it a lot easier to write and manage your workflows in VS Code.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions" target="_blank" data-anchor="?itemName=GitHub.vscode-github-actions"&gt;Link to Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sat, 11 Nov 2023 22:33:53 Z</pubDate>
      <a10:updated>2023-11-11T22:33:53Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">4922ecf7-eb54-4afb-afe6-bb4008d65d82</guid>
      <link>https://www.enkelmedia.se/blogg/2023/11/1/gotchas-when-making-umbraco-packages-run-on-linux-mac?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Gotchas when making Umbraco packages run on Linux / Mac</title>
      <description>&lt;p&gt;Over the last couple of days, I've been working to make my &lt;a href="https://www.newsletterstudio.org"&gt;e-mail package Newsletter Studio&lt;/a&gt; run well on Linux and Mac. The codebase for the current iteration of the package was created for Umbraco 8 while trying to keep in mind that .NET Core-support for Umbraco was around the corner. Technically, most of the core C# code is in a .NET Standard 2.0 library that is shared between the different versions of the package.&lt;/p&gt;
&lt;p&gt;I have a very Windows-heavy background and back when the initial code for the package was created I did not really take into account the massive opportunities that the cross-platform support for modern .NET brings - I was mainly focused on getting it to run in .NET Core on a Windows box.&lt;/p&gt;
&lt;p&gt;More and more clients have asked for official Linux support, to be able to run the package e.g. in containers or on bare metal Linux servers. Over the last few days, I've put some effort into this and wanted to share some of the "gotchas" I've encountered along the way.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/hkodghcb/other-running-on-linux.png?rmode=max&amp;amp;width=850" alt="Newsletter Studio running on Ubuntu" width="850" height="531"&gt;&lt;/p&gt;
&lt;p&gt;Expect general tips and trips on how to write C# code that runs cross-platform and some Umbraco-package specific gotchas for packages targeting Umbraco v9-v13.&lt;/p&gt;
&lt;h2&gt;Case is king&lt;/h2&gt;
&lt;p&gt;On Unix-like operating systems like Linux and MacOS, the casing of a path or filename matters a lot since the filesystem is case-sensitive. This means that all code-references to folders and files need to match in case as well. This was one of the biggest problems with the code base when I started. The casing was mixed and there were no real standards for the casing. To make the code run well cross-platform I would propose a naming standard like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For folder names&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use lowercase names and kebab-case &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For client-side files (HTML, TypeScript, Javascript, CSS, SCSS, LESS)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use lowercase names and kebab-case&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For C# files and cshtml&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use CamelCase&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Working with Paths&lt;/h2&gt;
&lt;p&gt;Windows and Unix-like systems use different characters to separate paths. On Windows we use \ and on Unix /. C# has a built-in feature that helps with this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;string myPath = &amp;quot;folder&amp;quot; + Path.DirectorySeparatorChar + &amp;quot;sub-folder&amp;quot;;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;The .NET-runtime will make sure that Path.DirectorySeparatorChar contains the right character based on the OS where the code is running.&lt;/p&gt;
&lt;p&gt;One note here is that you can also use Path.Combine(), but be aware of how it works:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;[Test]
public void Test1()
{
    // Note that both path starts and ends with \\
    string path1 = &amp;quot;\\foo\\&amp;quot;;
    string path2 = &amp;quot;\\bar\\&amp;quot;;

    var merged = Path.Combine(path1, path2);

    // Fails, merged = \\bar\\
    Assert.That(merged,Is.EqualTo(&amp;quot;\\foo\\bar\\&amp;quot;));
}

[Test]
public void Test2()
{
    string path1 = &amp;quot;foo&amp;quot;;
    string path2 = &amp;quot;bar&amp;quot;;

    var merged = Path.Combine(path1, path2);

    // Success, merged = foo\\bar
    Assert.That(merged, Is.EqualTo(&amp;quot;foo\\bar&amp;quot;));

}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; The takeaway here is that you need to make sure not to try to build a path with input strings that have both leading and trailing slashes - find a way to be consistent.&lt;/p&gt;
&lt;h2&gt;Umbraco backoffice extensions&lt;/h2&gt;
&lt;p&gt;Newsletter Studio is built as a &lt;a rel="noopener" href="https://docs.umbraco.com/umbraco-cms/extending/section-trees/sections" target="_blank"&gt;custom section&lt;/a&gt; with a &lt;a rel="noopener" href="https://docs.umbraco.com/umbraco-cms/extending/section-trees/trees" target="_blank"&gt;custom tree&lt;/a&gt;, it's important to keep in mind that the alias of the section and trees will be used in the URLs when Umbraco loads the HTML views.  &lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/2r3acrf3/backoffice-route.png?rmode=max&amp;amp;width=850" alt="" width="850" height="70"&gt;&lt;/p&gt;
&lt;p&gt;In the image above we see the URL to a view in the package.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Alias of the Section (as in Content, Media etc)&lt;/li&gt;
&lt;li&gt;Alias of the Tree&lt;/li&gt;
&lt;li&gt;View name&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; In this scenario, Umbraco will look for a view here:  &amp;lt;siteroot&amp;gt;\App_Plugins\newsletterStudio\backoffice\section\campaigns.html. When running on a Unix-like operating system the whole path to that file needs to match in case was well.&lt;/p&gt;
&lt;h2&gt;Different code on different platforms&lt;/h2&gt;
&lt;p&gt;Sometimes you need to do different things based on the current platform/OS, there are many ways to do this, and here are some of them.&lt;/p&gt;
&lt;h3&gt;Check OS from C# during runtime&lt;/h3&gt;
&lt;p&gt;In the package, we have a default path for the "SMTP Pickup"-configuration used during development and testing. We can use the RuntimeInformation-class to know what platform we are running on and use different defaults.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
  // Do something
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;h3&gt;Checking OS from MSBuild during build&lt;/h3&gt;
&lt;p&gt;It might be that you need to execute different scripts depending on the build platform etc.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;Exec Command=&amp;quot;./foo.sh&amp;quot; Condition=&amp;quot; &amp;#x27;$(OS)&amp;#x27; != &amp;#x27;Windows_NT&amp;#x27; &amp;quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Razor Class Libraries and cross-platform development&lt;/h2&gt;
&lt;p&gt;In the package, all of the built-in views and assets are shipped as files inside a &lt;a href="https://www.enkelmedia.se/blogg/2023/5/9/converting-a-umbraco-package-to-a-razor-class-library" title="Converting a Umbraco Package to a Razor Class Library"&gt;Razor Class Library&lt;/a&gt; (RCL), this way we don't have to ship individual files that need to be copied/synced inside the consuming projects.&lt;/p&gt;
&lt;p&gt;I had major issues with this on the Ubuntu-machine I was working on. I kept getting errors that the Razor view did not exist, but I was 100% sure that the file existed in the RCL and that the casing of the path/filename was correct.&lt;/p&gt;
&lt;p&gt;After hours of debugging, I tried to upgrade the .Net SKD. When I was working on my PC I was on 7.0.400 but the version shipped in the Ubuntu package repository at the time was 7.0.113 so I used that. After manually installing 7.0.400 on the Ubuntu-machine the error was gone. &lt;/p&gt;
&lt;p&gt;I was really surprised about this. Another thing that surprised me even more was when I opened the solution on my MacBook and started it using the same .NET SDK (7.0.400) - I got the same error as with 4.0.117 on Ubuntu!&lt;/p&gt;
&lt;p&gt;My objective was to test the package with an Umbraco site running on MacOS, so I tried to work around the error by building the NuGet-package files on my Windows-machine and then copying them over to the Mac. I created a new Umbraco project, installed the NuGet packages from a local package source, and started the website. Now the views worked!&lt;/p&gt;
&lt;p&gt;I have not had a closer look at why this is happening but it seems like the SKD builds for the different platforms might produce slightly different builds that work slightly differently. Just keep this in mind when strange things happen, try on another OS, try another SKD version - that might save you a couple of hours.&lt;/p&gt;
&lt;h2&gt;Development environment&lt;/h2&gt;
&lt;p&gt;I'm working on Ubuntu Desktop but I'm guessing that a MacOS environment would work just as well. I've found that the following tools are very helpful:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel="noopener" href="https://code.visualstudio.com/" target="_blank"&gt;Visual Studio Code&lt;/a&gt; - Runs cross-platform&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sqlitebrowser.org/"&gt;DB Browser for SQLite&lt;/a&gt; - To debug the SQLite database if used with Umbraco.&lt;/li&gt;
&lt;li&gt;Docker + &lt;a rel="noopener" href="https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker" target="_blank"&gt;SQL Server for Linux&lt;/a&gt; - If you need to run "full-blown" SQL Server.&lt;/li&gt;
&lt;li&gt;&lt;a rel="noopener" href="https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux" target="_blank"&gt;Powershell &lt;/a&gt;- Also cross-platform, great to reuse scripts for all OS versions&lt;/li&gt;
&lt;li&gt;&lt;a rel="noopener" href="https://www.jetbrains.com/rider/" target="_blank"&gt;Rider IDE&lt;/a&gt; - As an old Resharper fanboy, Rider is great and provides a consistent development experience on all platforms.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Wed, 01 Nov 2023 10:31:11 Z</pubDate>
      <a10:updated>2023-11-01T10:31:11Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">f40a51df-7fd5-46f6-b03b-964a8859b05c</guid>
      <link>https://www.enkelmedia.se/blogg/2023/10/31/umbraco-boot-failed-umbraco-cannot-run-when-upgrading-to-umbraco-12?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco: Boot failed: Umbraco cannot run. When upgrading to Umbraco 12</title>
      <description>&lt;p&gt;We have been doing a lot of Umbraco upgrades lately and have been hitting the same issue several times so I decided that I have to blog about it for "future me" and any other Umbraco developer that has the same problem with booting when trying to upgrade to Umbraco 12.&lt;/p&gt;
&lt;p&gt;The error message looks something like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco&amp;#x27;s log file for more details. 
at Umbraco.Cms.Core.Exceptions.BootFailedException.Rethrow(BootFailedException bootFailedException)
at Umbraco.Cms.Web.Common.Middleware.BootFailedMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.&amp;lt;&amp;gt;c__DisplayClass6_1.&amp;lt;&amp;lt;UseMiddlewareInterface&amp;gt;b__1&amp;gt;d.MoveNext()

--- End of stack trace from previous location ---
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at React.AspNet.BabelFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;It's really hard to know what went wrong based on this error message. The Umbraco version that I was installing (12.0.1) did not show any kind of helpful information when the site was booting. It's easy to think that it's something wrong with any of the middleware but they are just showing up because they are a part of the pipeline.&lt;/p&gt;
&lt;p&gt;After some research, I found a couple of posts in the Umbraco forum around similar issues:&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://our.umbraco.com/forum/using-umbraco-and-getting-started/112173-error-while-upgrade-from-1141-to-12" target="_blank"&gt;https://our.umbraco.com/forum/using-umbraco-and-getting-started/112173-error-while-upgrade-from-1141-to-12&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://our.umbraco.com/forum/using-umbraco-and-getting-started/112407-umbraco-v12-exception-at-startup-when-run-in-docker" target="_blank"&gt;https://our.umbraco.com/forum/using-umbraco-and-getting-started/112407-umbraco-v12-exception-at-startup-when-run-in-docker&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It turns out that dependencies were updated for v12 and that Microsoft.Data.SqlClient has some breaking changes that require us to explicitly trust the SQL Server certificate. This can be done by appending TrustServerCertificate=true to the database connection string:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;{
&amp;quot;ConnectionStrings&amp;quot;: {
    &amp;quot;umbracoDbDSN&amp;quot;: &amp;quot;&amp;lt;server,user,password&amp;gt;;TrustServerCertificate=true;&amp;quot;,
  }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; This made the site start again and the installer to kick in.&lt;/p&gt;</description>
      <pubDate>Tue, 31 Oct 2023 12:28:39 Z</pubDate>
      <a10:updated>2023-10-31T12:28:39Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">becad05d-3be1-4cf2-8db6-db3f7cfa3350</guid>
      <link>https://www.enkelmedia.se/blogg/2023/9/13/teamcity-show-results-from-net-core-net5-test-projects?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>TeamCity: Show results from .NET Core / .NET5+ test-projects</title>
      <description>&lt;p&gt;When using TeamCity and the .NET Runner Type to execute a "dotnet test"-command during the build you will have to add the TeamCity test adapter-package for the test results to show up in TeamCity UI.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/p2rjaxcr/image.png?rmode=max&amp;amp;width=594&amp;amp;height=50" alt="" width="594" height="50"&gt;&lt;/p&gt;
&lt;p&gt;In this image we see:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;A build where the test adapter was added to the test-project&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A build where the test adapter was not added to the test-project.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;To make sure test results are shown in TeamCity during the build, add this package to the csproj-file of the test project:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;PackageReference Include=&amp;quot;TeamCity.VSTest.TestAdapter&amp;quot; Version=&amp;quot;1.0.37&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Wed, 13 Sep 2023 14:41:34 Z</pubDate>
      <a10:updated>2023-09-13T14:41:34Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">5e6b1538-4158-4de9-9fd6-dc2c45baf8a7</guid>
      <link>https://www.enkelmedia.se/blogg/2023/8/21/random-stuff-around-migration-from-umbraco-7-to-vnext?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Random stuff around migration from Umbraco 7 to vNext</title>
      <description>&lt;p&gt;This year has been a lot about migration. Since Umbraco 7 will be end of life quite soon we help a lot of clients to migrate.&lt;/p&gt;
&lt;p&gt;There is a lot of great content already out there about the migration process so I figured I'll share some of the "bumps" &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;JQuery and Umbraco Api Controllers&lt;/h2&gt;
&lt;p&gt;Many times we have code that sends a vanilla MVC-form using JQuery's $.post feature like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;$.post(&amp;quot;/Umbraco/Api/MyController/DoSomething&amp;quot;, $(&amp;quot;#form&amp;quot;).serialize())&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;When posting this to the controllers we noticed a strange error from the controller.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;{
 &amp;quot;type&amp;quot;:&amp;quot;https://tools.ietf.org/html/rfc7231#section-6.5.13&amp;quot;,
 &amp;quot;title&amp;quot;:&amp;quot;Unsupported Media Type&amp;quot;,
 &amp;quot;status&amp;quot;:415,
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;JQuery will post the data as form data but the controller expects JSON, the simple solution is to add a [FromForm]-attribute in the controller action.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;[HttpPost]
public IActionResult DoSomething([FromForm] MyModel model)
{
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 21 Aug 2023 08:00:53 Z</pubDate>
      <a10:updated>2023-08-21T08:00:53Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1ae2bead-ad70-443e-a2ca-9795a3c6a3ac</guid>
      <link>https://www.enkelmedia.se/blogg/2023/5/9/converting-a-umbraco-package-to-a-razor-class-library?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Converting a Umbraco Package to a Razor Class Library</title>
      <description>&lt;p&gt;Since ASP.NET Core 2.1 the project type "Razor Class Library", or RCL, has been around. This feature allows shipping C#, Razor views, and front-end assets (like JavaScript, CSS, HTML files) in a single DLL file. This is perfect for component vendors and an excellent fit for packages/plugins. We also use Razor Class Libraries for internal utility/helper projects when building websites. &lt;/p&gt;
&lt;p&gt;When using a RCL in a web project, any assets or files from the RCL can be served from the website and we can override certain files from the consuming project if we need - which is a really great feature.&lt;/p&gt;
&lt;p&gt;Umbraco 11.0.0 was the first version where full support for RCL-packages was introduced. It might be possible to partially ship a package as RCL and run on earlier versions and certainly, you can use a RCL for your utility/helper projects on earlier versions of Umbraco.&lt;/p&gt;
&lt;h4&gt;Why use Razor Class Library for my package?&lt;/h4&gt;
&lt;p&gt;I've been building several packages for the "vNext"-versions of Umbraco using the old recommended approach with build-targets to copy App_Plugin-files into the consuming web project. With a Razor Class Library, there is no need for this copy-step and the developer experience is a lot better! We even got "hot reload" when editing assets in the RCL and saving it will automatically update the backoffice (no js-builders, webpack, grunt or so needed).&lt;/p&gt;
&lt;p&gt;The main benefits that I see are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A lot simpler deployments. All files are in one place.&lt;/li&gt;
&lt;li&gt;Easier for developers that install the package&lt;/li&gt;
&lt;li&gt;Better developer experience&lt;/li&gt;
&lt;li&gt;Has a built-in mechanism for making overrides possible which is awesome.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/3ndp2e1r/blog-razor-class-library-auto-reload.gif?rmode=max&amp;amp;width=850&amp;amp;height=451" alt="" width="850" height="451"&gt;&lt;/p&gt;
&lt;p&gt;Are you ready to try it out? If you're starting from scratch, use the official &lt;a href="https://github.com/umbraco/Umbraco-CMS/tree/contrib/templates"&gt;Umbraco Package Template&lt;/a&gt; which ships with a RCL-version since 11.4.&lt;/p&gt;
&lt;h4&gt;Upgrade or Migrate an existing Umbraco package to use Razor Class Library&lt;/h4&gt;
&lt;p&gt;It turns out that moving to a RCL for your package is quite easy, I did this for my &lt;a href="https://www.newsletterstudio.org/"&gt;Newsletter Studio&lt;/a&gt;-package in less than a day and this package is huge. The &lt;a href="https://marketplace.umbraco.com/package/umbracoseovisualizer"&gt;SeoVizualiser&lt;/a&gt; only took me a couple of minutes to move into a RCL.&lt;/p&gt;
&lt;p&gt;Here are the basic steps that I performed:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.  Change the csproj&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We need to update the .csproj-file to use the "Microsoft.NET.Sdk.Razor"-SDK and add two new elements to the configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AddRazorSupportForMvc&lt;/li&gt;
&lt;li&gt;StaticWebAssetBasePath&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Should look something like this&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;Project Sdk=&amp;quot;Microsoft.NET.Sdk.Razor&amp;quot;&amp;gt;
  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;TargetFramework&amp;gt;net7&amp;lt;/TargetFramework&amp;gt;
    &amp;lt;AddRazorSupportForMvc&amp;gt;true&amp;lt;/AddRazorSupportForMvc&amp;gt;
    &amp;lt;StaticWebAssetBasePath&amp;gt;/&amp;lt;/StaticWebAssetBasePath&amp;gt;
    &amp;lt;ContentTargetFolders&amp;gt;.&amp;lt;/ContentTargetFolders&amp;gt;
    ....
  &amp;lt;/PropertyGroup&amp;gt;
&amp;lt;/Project&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;&lt;br&gt;Depending on how you used to ship the client side files, you might need to cleanup includes from the csproj file, if you've been using the Umbraco HQ-templates this part needs to be removed:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;Content Include=&amp;quot;App_Plugins\{YourPackageFolder}\**\*.*&amp;quot;&amp;gt;
    &amp;lt;ExcludeFromSingleFile&amp;gt;true&amp;lt;/ExcludeFromSingleFile&amp;gt;
    &amp;lt;CopyToPublishDirectory&amp;gt;Always&amp;lt;/CopyToPublishDirectory&amp;gt;
&amp;lt;/Content&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Add wwwroot-folder&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The project should now reload and we need to add a wwwroot-folder to the project. This folder works in the same way as the wwwroot-folder in a web-project, any files in this folder will be available in the consuming website just as if they were a part of the website. They can also be overridden in the consuming website which is great. In my projects. I've just moved the App_Plugins-folder into the wwwroot of my RCL:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/og2pl43h/blog-razor-project-structure.png?rmode=max&amp;amp;width=515&amp;amp;height=238" alt="" width="515" height="238"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Modify or remove any .target file included in the NuGet package.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Umbraco HQ-templates for packages used to include a {package-name}.target-file that was used to copy files from the NuGet-package into the project using it. This needs to be removed, or at least cleaned up.&lt;/p&gt;
&lt;p&gt;That's it! You will have to build your project and you might need to rebuild and clean the project, I've also had to restart Visual Studio after making these changes. &lt;/p&gt;
&lt;p&gt;To create a NuGet-package just use this command: dotnet pack --configuration Release&lt;/p&gt;
&lt;p&gt;It's important to make sure that your package includes the folder "staticwebassets". I did have issues with multi-targeted packages so if you don't see this folder, make sure that your package is not multitargeted. In my case, the element "TargetFrameworks" was present in the .csproj but only had NET7 as target, after changing this to "TragetFramework" the pack-command worked.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/5n0lsqib/blog-razor-package-content.png?rmode=max&amp;amp;width=850" alt="" width="850" height="594"&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Other things that are good to know about Razor Class Libraries&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;&lt;br&gt;Shipping Razor Views&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At the end of the day, this is a Razor Class Library. Just as in a web project, the view engine of ASP.NET will look for views (.cshtml) in the application root and not in the wwwroot. So let's say that you're shipping a package that need to contain a Partial view and some special views in the App_Pluggins-folder, your structure might look like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;wwwroot/App_Plugins/MyPackage - for Javascript, CSS, Html&lt;/li&gt;
&lt;li&gt;App_Plugins/MyPackage/Views - for some special view&lt;/li&gt;
&lt;li&gt;Views/Partial/Lorem.cshtml - For a partial view that can be reused in the consuming project.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Using files from the RCL in code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most of the time "things just work", views are used, assets are served and life is happy. Sometimes you might need some more fine-grained control over stuff, you might need to read the content of a file that you know is inside a Razor Class Library, or maybe you need to check if a file is present at a given path?&lt;/p&gt;
&lt;p&gt;This intersection between files on the filesystem and the content of RCLs is handled by a IFileProvider, the easiest way to get your hands on the one used in your project is to inject the IWebHostEnvironment from Microsoft.AspNetCore.Hosting into your class and use the WebRootFileProvider:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var fileInfo = _webHostEnvironment.WebRootFileProvider.GetFileInfo(classLibraryFilePath);

using Stream stream = fileInfo.CreateReadStream();
using var reader = new StreamReader(stream, Encoding.UTF8);
var fileContent = reader.ReadToEnd();&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;&lt;br&gt;I hope that this blog post was helpful and that you're excited to try building your next Umbraco package or extension as a Razor Class Library. Feel free to leave a comment or question!&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sat, 29 Jul 2023 20:29:51 Z</pubDate>
      <a10:updated>2023-07-29T20:29:51Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">405728f3-6d2c-40ef-9ed6-4c898a9188af</guid>
      <link>https://www.enkelmedia.se/blogg/2023/4/9/folder-level-request-headers-in-postman?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Folder-level request headers in Postman</title>
      <description>&lt;p&gt;I guess that most developers have heard of, or used the API tool &lt;a rel="noopener" href="https://www.postman.com/" target="_blank"&gt;Postman&lt;/a&gt;. I use it every day to test and explore APIs. I used to find my self copying and pasting request headers and tokens for different environments (test, stage, production) I started to look for a better solution.&lt;/p&gt;
&lt;p&gt;Turns out that Postman has a nice feature where you can put your authorization-settings on the parent folder to easily reuse these for all requests.&lt;/p&gt;
&lt;p&gt;So when you click on a folder like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/nc5cnhvk/blog-postman-scripts.png?rmode=max&amp;amp;width=362&amp;amp;height=148" alt="" width="362" height="148"&gt;&lt;/p&gt;
&lt;p&gt;You'll get this view where you can add authorization-settings for all requests in that folder.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/2gpnerrx/blog-postman-auth.png?rmode=max&amp;amp;width=850" alt="" width="850" height="424"&gt;&lt;/p&gt;
&lt;p&gt;Sometimes however the standard options for authorization are not enough, some APIs might require more than one header, etc. In these scenarios the "Pre-request Scripts"-feature comes in really handy. It allows you to manipulate the request before it fires and allow us to configure common headers for all our requests.&lt;/p&gt;
&lt;p&gt;Here is a example:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/lrap0sg2/blog-postman-pre-request-script.png?rmode=max&amp;amp;width=850" alt="" width="850" height="397"&gt;&lt;/p&gt;
&lt;p&gt;Just put this code in the Script-input to run it for every request:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;pm.request.headers.add({key:&amp;#x27;Api-Key&amp;#x27;,value:&amp;#x27;xxxxx&amp;#x27;});&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;
</description>
      <pubDate>Sat, 29 Jul 2023 20:28:43 Z</pubDate>
      <a10:updated>2023-07-29T20:28:43Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">66f4a439-9326-4a18-a909-4e91f50776c7</guid>
      <link>https://www.enkelmedia.se/blogg/2022/7/16/umbraco-supported-t-sql-in-sql-server-vs-sqlite?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco, supported T-SQL in SQL Server vs SQLite</title>
      <description>&lt;p&gt;Since Umbraco v10 ships with SQLite and no more SQLCE I figured it would be a good idea upgrade my old "&lt;a href="https://www.enkelmedia.se/blogg/2019/10/22/t-sql-compare-sql-server-vs-sql-ce-compact-edition" title="T-SQL compare SQL Server vs SQL CE (Compact Edition)"&gt;compare post&lt;/a&gt;" about SQL Server vs SQLCE.&lt;/p&gt;
&lt;p&gt;There is a big difference between the databases in that the data types are very different but I was surprised to see that SQLite supports many types of queries that SQL CE did not. The &lt;a rel="noopener" href="https://www.sqlite.org/datatype3.html" target="_blank"&gt;data types&lt;/a&gt; in SQLite is basically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NULL&lt;/li&gt;
&lt;li&gt;INTEGER&lt;/li&gt;
&lt;li&gt;REAL&lt;/li&gt;
&lt;li&gt;TEXT&lt;/li&gt;
&lt;li&gt;BLOB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This will be a "work in progress" blog post about the differences between SQL Server and SQLite and I will keep updating it when I find new cases.&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;table border="0" style="height: 1486px; width: 1214px;"&gt;
&lt;tbody&gt;
&lt;tr style="height: 43px;"&gt;
&lt;td style="height: 43px; width: 294px;"&gt;
&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 798px;"&gt;
&lt;p&gt;&lt;strong&gt;Query-example&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 70px;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Serv.&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 52px;"&gt;
&lt;p&gt;&lt;strong&gt;SQLCE&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 43px;"&gt;
&lt;td style="height: 43px; width: 294px;"&gt;
&lt;p&gt;Regular SELECT&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 798px;"&gt;
&lt;p&gt;SELECT * FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 52px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px; width: 294px;"&gt;
&lt;p&gt;SELECT with Subquery in select-statement&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 798px;"&gt;
&lt;p&gt;SELECT id,&lt;br&gt;(SELECT COUNT(pk) from cmsDictionary) as Test&lt;br&gt;FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 52px;"&gt;x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px; width: 294px;"&gt;
&lt;p&gt;SELECT with Subquery in WHERE-statement&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 798px;"&gt;
&lt;p&gt;SELECT id, [text]&lt;br&gt;FROM umbracoNode&lt;br&gt;WHERE Id IN (SELECT nodeId from umbracoContentVersion)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 52px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px; width: 294px;"&gt;
&lt;p&gt;SELECT with Subquery (scalar&lt;sup&gt;1&lt;/sup&gt;) in WHERE&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 798px;"&gt;
&lt;p&gt;&lt;br&gt;SELECT id, [text]&lt;br&gt;FROM umbracoNode&lt;br&gt;WHERE Id = (SELECT TOP 1 nodeId from umbracoContentVersion)&lt;br&gt;&lt;br&gt;SQLite: WHERE Id = (SELECT nodeId from umbracoContentVersion LIMIT 1)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 52px;"&gt;x&lt;sup&gt;5&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px; width: 294px;"&gt;
&lt;p&gt;SELECT with Inner Join&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 798px;"&gt;
&lt;p&gt;SELECT n.id, n.[text]&lt;br&gt;FROM umbracoNode n&lt;br&gt;INNER JOIN cmsDataType d ON d.nodeId = n.id&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px; width: 70px;"&gt;x&lt;/td&gt;
&lt;td style="height: 85px; width: 52px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px; width: 294px;"&gt;
&lt;p&gt;SELECT with STUFF-function&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 798px;"&gt;
&lt;p&gt;SELECT id,[text], STUFF([text],1,1, '')&lt;br&gt;FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 52px;"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 33px;"&gt;
&lt;td style="height: 33px; width: 294px;"&gt;
&lt;p&gt;SELECT TOP &lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 33px; width: 798px;"&gt;
&lt;p&gt;SELECT TOP 5 * FROM cmsContentType&lt;br&gt;&lt;br&gt;SELECT * FROM cmsContentType LIMIT 5&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 33px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 33px; width: 52px;"&gt;
&lt;p&gt;x&lt;sup&gt;5&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 106px;"&gt;
&lt;td style="height: 106px; width: 294px;"&gt;
&lt;p&gt;SELECT with “FOR XML PATH”. &lt;br&gt;Will format as a scalar XML-payload&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px; width: 798px;"&gt;
&lt;p&gt;SELECT TOP 10 id,[text]&lt;br&gt;FROM umbracoNode&lt;br&gt;ORDER By [text]&lt;br&gt;FOR XML Path('node')&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px; width: 70px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px; width: 52px;"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 106px;"&gt;
&lt;td style="height: 106px; width: 294px;"&gt;
&lt;p&gt;Row_Number() / Paging with &lt;br&gt;SELECT with ROW_NUMBER()&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px; width: 798px;"&gt;
&lt;p&gt;SELECT id,[text],&lt;br&gt;ROW_NUMBER() OVER (ORDER BY [text]) AS RowNumber&lt;br&gt;FROM umbracoNode&lt;br&gt;ORDER By [text]&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px; width: 52px;"&gt;X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 127px;"&gt;
&lt;td style="height: 127px; width: 294px;"&gt;
&lt;p&gt;Paging with &lt;br&gt;SELECT WITH OFFSET AND FETCH &lt;sup&gt;2&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 127px; width: 798px;"&gt;
&lt;p&gt;SELECT id,[text]&lt;br&gt;FROM umbracoNode&lt;br&gt;ORDER BY id&lt;br&gt;OFFSET 0 ROWS&lt;br&gt;FETCH NEXT 10 ROWS ONLY&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 127px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 127px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 43px;"&gt;
&lt;td style="height: 43px; width: 294px;"&gt;
&lt;p&gt;SELECT DISTINCT-feature&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 798px;"&gt;
&lt;p&gt;SELECT DISTINCT Id from umbracoContentVersion ORDER BY Id&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 32px;"&gt;
&lt;td style="height: 32px; width: 294px;"&gt;
&lt;p&gt;SELECT COUNT with DISTINCT&lt;sup&gt;3&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 798px;"&gt;
&lt;p&gt;&lt;span&gt;SELECT&lt;/span&gt; &lt;span&gt;COUNT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DISTINCT&lt;/span&gt; thumbnail&lt;span&gt;)&lt;/span&gt; &lt;span&gt;FROM&lt;/span&gt; cmsContentType&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px; width: 294px;"&gt;
&lt;p&gt;SELECT with LIKE in Where&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 798px;"&gt;
&lt;p&gt;SELECT * &lt;br&gt;FROM umbracoNode WHERE [text] LIKE '%st%'&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px; width: 294px;"&gt;
&lt;p&gt;SELECT with Subquery in FROM-statement.&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 798px;"&gt;
&lt;p&gt;SELECT count(contentId) &lt;br&gt;FROM (SELECT DISTINCT contentId FROM cmsContentVersion) cmsContentVersion&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px; width: 294px;"&gt;
&lt;p&gt;SELECT with LEFT OUTER JOIN&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 798px;"&gt;
&lt;p&gt;SELECT n.id, n.[text], d.text, d.preventCleanup FROM umbracoNode as n&lt;br&gt;LEFT OUTER JOIN umbracoContentVersion as d ON n.id = d.nodeId&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 32px;"&gt;
&lt;td style="height: 32px; width: 294px;"&gt;
&lt;p&gt;Parameter Alias declared as string&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 798px;"&gt;
&lt;p&gt;SELECT id as 'foo' FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 32px;"&gt;
&lt;td style="height: 32px; width: 294px;"&gt;
&lt;p&gt;Parameter Alias declared inline&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 798px;"&gt;
&lt;p&gt;SELECT id as foo FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 94px;"&gt;
&lt;td style="height: 94px; width: 294px;"&gt;
&lt;p&gt;SELECT with INNER JOIN Subquery in FROM&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 94px; width: 798px;"&gt;
&lt;p&gt;SELECT * FROM cmsTemplate as t&lt;br&gt;INNER JOIN (SELECT templateId, count(id) as total &lt;br&gt;FROM umbracoDocumentVersion WHERE published = 1 &lt;br&gt;GROUP by templateId) as dv ON dv.templateId = t.nodeId&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 94px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 94px; width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 75px;"&gt;
&lt;td style="height: 75px; width: 294px;"&gt;
&lt;p&gt;CROSS APPLY&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 75px; width: 798px;"&gt;
&lt;p&gt;SELECT id,userName,ugr.Roles FROM umbracoUser u&lt;br&gt;CROSS APPLY (SELECT COUNT(ug.userId) as Roles FROM umbracoUser2UserGroup AS ug WHERE ug.userId = u.id) as ugr&lt;br&gt;ORDER BY ugr.Roles DESC&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 75px; width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 75px; width: 52px;"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 54px;"&gt;
&lt;td style="width: 294px; height: 54px;"&gt;
&lt;p&gt;DATEPART&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 798px; height: 54px;"&gt;
&lt;p&gt;SELECT DATEPART(YEAR, createDate) AS [Year] &lt;br&gt;FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 70px; height: 54px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 52px; height: 54px;"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 37px;"&gt;
&lt;td style="width: 294px; height: 37px;"&gt;
&lt;p&gt;CAST&lt;sup&gt;4&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 798px; height: 37px;"&gt;
&lt;p&gt;SELECT CAST(id as text) textId FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 70px; height: 37px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 52px; height: 37px;"&gt;
&lt;p&gt;X*&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 33px;"&gt;
&lt;td style="width: 294px; height: 33px;"&gt;
&lt;p&gt;DATALENGTH&lt;sup&gt;6&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 798px; height: 33px;"&gt;
&lt;p&gt;SELECT DATALENGTH([text]) textId FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 70px; height: 33px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 52px; height: 33px;"&gt;
&lt;p&gt;X*&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 294px;"&gt;
&lt;p&gt;UNION ALL&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 798px;"&gt;
&lt;p&gt;SELECT id,userLogin as [email] FROM umbracoUser&lt;br&gt;UNION ALL&lt;br&gt;SELECT nodeId as id,email FROM cmsMember&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 52px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="width: 294px;"&gt;
&lt;p&gt;CONVERT&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 798px;"&gt;
&lt;p&gt;SELECT CONVERT(nvarchar(50), uniqueId) as data3 FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 70px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="width: 52px;"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;....&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. A scalar query is a query that returns one row consisting of one column.&lt;/span&gt;&lt;br&gt;&lt;span&gt;2. Works on SQL Server 2012+, older versions need the ROW_NUMBER()&lt;/span&gt;&lt;br&gt;&lt;span&gt;3. Another version of the query with a join in the FROM-caluse works on SQL CE: SELECT COUNT(thumbs.total) as Total FROM (SELECT DISTINCT thumbnail as total FROM cmsContentType) as thumbs&lt;br&gt;&lt;/span&gt;&lt;span&gt;4. Since the column data types are not the same (SQL Server has nvarchar, varchar while SQLite uses TEXT) this needs to be handled.&lt;br&gt;5. SELECT TOP is not supported in SQLite. But if the subquery was SELECT nodeId from umbracoContentVersion LIMIT 1 it would work.&lt;br&gt;6. SQLite calls this function length, used like so: length([columnName])&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sat, 16 Jul 2022 20:45:47 Z</pubDate>
      <a10:updated>2022-07-16T20:45:47Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">6e0d1e93-2713-4fef-844e-198228d3ef29</guid>
      <link>https://www.enkelmedia.se/blogg/2022/6/21/remove-entries-from-umbraco-forms?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Remove entries from Umbraco Forms</title>
      <description>&lt;p&gt;This blog post will explain how this works in Umbraco Forms 8.4.4. Database tables will most likely change between versions so keep this in mind - one might have to adjust the SQL-scripts depending on the Umbraco Forms-version.&lt;/p&gt;
&lt;h4&gt;Some basics&lt;/h4&gt;
&lt;p&gt;Before diving into details we need to be on the same page when it comes to the different building blocks in Umbraco Forms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Forms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A Form is an actual Form, with all its fields, configured in the backoffice. Umbraco Forms stores the actual Forms as json-files on disk (\App_Data\UmbracoForms\Data\forms).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Field&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A Form is built up by adding Fields to the form, giving them a name, alias and choosing a Form Field Type.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Entry&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An entry is what gets stored when a visitor/user posts a Form. One can browse these Entries by expanding a form and clicking on "Entries". Each entry is stored together with all the values for the different Fields in the Form.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Database tables&lt;/h4&gt;
&lt;p&gt;Here is a brief overview of the data tables used by Umbraco Forms.&lt;/p&gt;
&lt;h3&gt;Entries and Fields&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;UFRecords&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A UFRecord in the database is the same as one Entry in the UI. Each posted form will generate one UFRecord. This table contains information like when the Entry was created, on which page and from what IP.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFRecordFields&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This table "connects" each Field in the Form with the Entry. If the form has 5 fields, there should be 5 rows in this table for each Entry/Record. &lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;Database tables&lt;/h3&gt;
&lt;p&gt;All these tables are used to store data based on the data-type, they have a id and key-column and a column for the value (base on the data type).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFRecordDataString&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFRecordDataLongString&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFRecordDataInteger&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFRecordDataBit&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFRecordDataDateTime&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h3&gt;Security&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;UFUserSecurity&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Stores security settings related to specific Backoffice Users&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UFUserFormSecurity&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Stores security settings related to specific Forms&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Delete data with SQL-script&lt;/h4&gt;
&lt;p&gt;To be able to delete an Entry we need to remove all related data in the UFRecordDataXXX-tables, the UFRecordFields and the UFRecord it self.&lt;/p&gt;
&lt;p&gt;Here is a SQL-statement to remove Entries from Umbraco Forms, set the @formKey to only remove entries for specific Form, or use an empty string as @formKey to remove all Entries.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;-- Use this to delete entries for a single form
DECLARE @formKey nvarchar(MAX) = &amp;#x27;f8274271-239c-4564-9f5e-0629bb02ca01&amp;#x27;;

-- Use this to delete entries for all forms
--DECLARE @formKey nvarchar(MAX) = &amp;#x27;&amp;#x27;;

DECLARE @formRecordIds TABLE
(
   recordId int
);

DECLARE @fieldKeys TABLE
(
   fieldKey uniqueidentifier
);


IF @formKey = &amp;#x27;&amp;#x27; 
	BEGIN
		INSERT INTO @formRecordIds SELECT [id] FROM [UFRecords] 
	END
ELSE 
	BEGIN
		INSERT INTO @formRecordIds SELECT [id] FROM [UFRecords] WHERE [Form] = @formKey
	END

-- Populate temp-table with a record-ids for the given form. Should match the number if the Umbraco Forms-dashboard

SELECT * FROM @formRecordIds

-- Populate the fieldKeys with all Field keys for any of the Records for the Form
INSERT INTO @fieldKeys SELECT [key] FROM [UFRecordFields] WHERE [Record] IN (SELECT recordId FROM @formRecordIds)
SELECT * FROM @fieldKeys



-- Delete all UFRecordDataXXX rows for any of the Fields in any of the Records
DELETE FROM UFRecordDataBit WHERE [key] IN (SELECT fieldKey FROM @fieldKeys)
DELETE FROM UFRecordDataDateTime WHERE [key] IN (SELECT fieldKey FROM @fieldKeys)
DELETE FROM UFRecordDataInteger WHERE [key] IN (SELECT fieldKey FROM @fieldKeys)
DELETE FROM UFRecordDataLongString WHERE [key] IN (SELECT fieldKey FROM @fieldKeys)
DELETE FROM UFRecordDataString WHERE [key] IN (SELECT fieldKey FROM @fieldKeys)

-- Delete the Fields
DELETE FROM UFRecordFields WHERE [key] IN (SELECT fieldKey FROM @fieldKeys)

-- Delete the Records
DELETE FROM UFRecords WHERE id IN (SELECT recordId FROM @formRecordIds)&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Tue, 21 Jun 2022 11:51:09 Z</pubDate>
      <a10:updated>2022-06-21T11:51:09Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e6204164-bd43-4fe0-b8ac-1bd2b4c48e4a</guid>
      <link>https://www.enkelmedia.se/blogg/2021/10/24/asp-net-framework-server-mappath-hostingenvironment?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>ASP.NET Framework Server.MapPath, HostingEnvironment</title>
      <description>&lt;p&gt;While working with ASP.NET Framework we sometimes need to get the physical path to a folder on the filesystem. The most common way to do this is using Server.MapPath("~/relative-folder"). I've researched best practices around this several times just to forget the details a couple of months later so in this post I'll outline my findings are share some of my own best practices.&lt;/p&gt;
&lt;p&gt;So when building a web app there is mainly two "contexts" in which I need to get file system information, in my actual application code and in some of my unit tests. Most of the time I strive to mock out IO from my unit tests but in some scenarios, I also need to perform actual testing with the filesystem to be more confident that my tests are not giving me false positives.&lt;/p&gt;
&lt;h2&gt;Physical file paths in web applications&lt;/h2&gt;
&lt;p&gt;The "goto" standard back in the days was to always use HttpContext.Current.Server.MapPath() which would "translate" a relative path into a full file system path. BUT. This object is request-bound, meaning that it will only exist inside the context of a web request. If we run inside a background job with something like Hangfire or Quartz this object will not exist. That's why &lt;strong&gt;I always recommend using HostingEnvironment.MapPath(path)&lt;/strong&gt; that will work in both request-context and in background jobs.&lt;/p&gt;
&lt;p&gt;I also wanted to know if and how these might differ from one another so I created this table to see how Server.MapPath() behaves.&lt;/p&gt;
&lt;table border="0" width="562" height="88" style="height: 200px;"&gt;
&lt;tbody&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td width="154" style="height: 20px;"&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;/td&gt;
&lt;td width="205" style="height: 20px;"&gt;&lt;strong&gt;Returns&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("~/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("App_Plugins")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("/App_Plugins")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("~/App_Plugins")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("App_Plugins/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("/App_Plugins/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HttpContext.Current.Server.MapPath("~/App_Plugins/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins\&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br&gt;Note that it does not matter if the relative path starts with "/", "~/", or just the folder name. Also, note that any trailing slash in the relative path will be reflected with a trailing slash in the file system path.&lt;/p&gt;
&lt;p&gt;Doing the same thing with HostingEnvironment.MapPath() reveals some differences.&lt;/p&gt;
&lt;table border="0" width="562" height="88" style="height: 200px;"&gt;
&lt;tbody&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td width="154" style="height: 20px;"&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;/td&gt;
&lt;td width="205" style="height: 20px;"&gt;&lt;strong&gt;Returns&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;Throws exception&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("~/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("App_Plugins")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;Throws exception&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("/App_Plugins")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("~/App_Plugins")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("App_Plugins/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;Throws exception&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("/App_Plugins/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins\&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 20px;"&gt;
&lt;td style="height: 20px;"&gt;HostingEnvironment.MapPath("~/App_Plugins/")&lt;/td&gt;
&lt;td style="height: 20px;"&gt;D:\Dev\TestApp\App_Plugins\&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br&gt;Note here that the relative path must start with either "/" or "~/" otherwise, the method will throw.&lt;/p&gt;
&lt;p&gt;Overall conclusions and recommendations&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use HostingEnvironment.MapPath().&lt;/li&gt;
&lt;li&gt;A folder path is indicated by the trailing slash, otherwise, it's a file path. Consider always using trailing slash for folders.&lt;/li&gt;
&lt;li&gt;Always make sure that the relative path passed to MapPath() starts with a slash.&lt;/li&gt;
&lt;li&gt;Be aware that the method will respect and include any trailing slash from the relative path into the physical path.&lt;/li&gt;
&lt;li&gt;Avoid using things like AppDomain.CurrentDomain.BaseDirectory and build paths based on this as any virtual directories configured in IIS will not be respected with this approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Physical Paths in unit tests&lt;/h2&gt;
&lt;p&gt;This one is a little harder as we want our unit tests to be "self-contained" and not be dependent on any magic path on the developer's filesystem or a build server. Inside a unit test or any .NET app, you can always find the path to the executing program with AppDomain.CurrentDomain.BaseDirectory, in the case of a unit test this would return something like d:\Dev\TestApp\My.UnitTest\Bin\Debug. One might be tempted to traverse the path with ..\..\ to get to the project root but this only works if the folders created have this exact nomenclature. I would argue that there is a better way:&lt;/p&gt;
&lt;p&gt;Create a folder called "MockFileSystem" inside your test project, this will act as the "root" of your application similar to what you would get from HostingEnvironment.MapPath("/"). Inside this folder, we can replicate the relevant files and store them inside our test project. It's important that we set the "Build action" for each item to "Content" and choose the "Copy if newer" option. This way the folder structure and files will be copied to the application´s root folder.&lt;/p&gt;
&lt;p&gt;Have your application code depend on an abstraction of the MapPath()-method, in my case, this is an interface like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;internal interface IFileSystemHelper
{
    string MapPath(string path);    
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;​The implementation inside the web project would look like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;internal sealed class FileSystemHelper : IFileSystemHelper
{
    public string MapPath(string path)
    {
        return HostingEnvironment.MapPath(path);        
    } 
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;​&lt;/p&gt;
&lt;p&gt;And in my unit test project:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;internal class MockFileSystemHelper : IFileSystemHelper
{
    public string MapPath(string path)
    {
        string baseDir = AppDomain.CurrentDomain.BaseDirectory + &amp;quot;MockFileSystem\\&amp;quot;;

        path = path.TrimStart(&amp;#x27;~&amp;#x27;).Replace(&amp;quot;/&amp;quot;, &amp;quot;\\&amp;quot;).TrimStart(&amp;#x27;\\&amp;#x27;);
        
        var full = Path.Combine(baseDir, path);

        return full;  
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;&lt;br&gt;To avoid the "issue" with some relative folders having trailing slashes and some not we could have our implementations strip any trailing slash from the returned path to be sure that we always get a full path without any trailing slash. Something like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public string MapPath(string path)
{
    return HostingEnvironment.MapPath(path).TrimEnd(&amp;#x27;\\&amp;#x27;);        
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sun, 24 Oct 2021 11:06:39 Z</pubDate>
      <a10:updated>2021-10-24T11:06:39Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">22211efa-d3d4-49b1-a78c-edbd0d886a19</guid>
      <link>https://www.enkelmedia.se/blogg/2021/10/13/my-own-pitfalls-with-net-runtime-cache?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>My own pitfalls with .NET runtime cache</title>
      <description>&lt;p&gt;I was working on a ASP.NET-project the other day where we use a runtime cache (aka. application cache) that lives for the duration of the application lifetime. We use this to store some frequently used data and we update the cache when something changes.&lt;/p&gt;
&lt;p&gt;The cache implementation is not state of the art and I figured I’ll share some learnings and pitfalls that I’ve fallen into over the years.&lt;/p&gt;
&lt;h2&gt;Mutable objects in the runtime cache&lt;/h2&gt;
&lt;p&gt;First of all: An mutable object, in contrast to an immutable object, is an object that can change it's state (aka properties on the object can change value without having to create a new object). Since an immutable object can't alter its state, we need to create a new instance of the object if we need to change any values. In .NET a standard class with get/set properties is mutable while DateTime, TimeSpan, and many others are immutable.&lt;/p&gt;
&lt;p&gt;Years ago one of the biggest gotcha for me with using the MemoryCache in .NET is that it will actually store objects. Not serialized objects but real objects in memory and only pass the reference to any consumer.&lt;/p&gt;
&lt;p&gt;This is of course great for performance, but it also means that one has to be very careful about how these objects are used. We could deep clone the object when fetching it from the cache to avoid many of the issues I’m going to point out here but in our case, we used the “vanilla memory cache” in .NET.&lt;/p&gt;
&lt;p&gt;Since the objects are mutable, we can easily change the state, ie. change a property or add an item to a list – we just need to remember that the next time this object is accessed the new values will be there, and the old values are gone.&lt;/p&gt;
&lt;h3&gt;&lt;br&gt;Updating values&lt;/h3&gt;
&lt;p&gt;Have a look at this code sample:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class SomeService {

    public bool UpdateCustomer(CustomerViewModel vm)
    {
        // Getting the value from the CustomerService, which is wrapped in a 
        // caching-decorator that uses the .NET MemoryCache.
        var customer = _customerService.GetCustomer(vm.CustomerId);

        customer.Name = vm.Name;
        customer.City = vm.City;
        customer.MaxOrderAmount = vm.MaxOrderAmount;

        var saveResult = _customerService.Save(customer);

        if(saveResult.HasValidationErrors)
            return ValidationError(saveResult);

        return Success();

    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;As you can see, we’re applying the changes from the view model into the Customer model and then saving it with the CustomerService which will validate the Customer before saving it. Let’s say that there is a validation error, the service will set HasValidationErrors to true and we’ll return the issues to the view.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BUT!&lt;/strong&gt; This code contains a nasty bug. Since the GetCustomer()-method returns an object from the cache, the changes we make to the object (setting the values from the view model) will be persisted in the cache no matter if the validation is successful or not. This is all very logical and makes sense but it’s a big “gotcha” in terms of how caching works.&lt;/p&gt;
&lt;p&gt;Another thing that has happened to me over the years: I was reading an object from the cache that had related entities (think customers with a List&amp;lt;Order&amp;gt;). I wanted to pass a Customer together with only paid orders to another service so I modified the order-property on the Customer like so:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;customer.Orders = customer.Orders.Where(x=&amp;gt;x.Paid == true).ToList();&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;This felt great and the service that I called could use the customer-object from the cache. The only problem is that the underlying collection of orders is modified and the next time I read the Customer from the cache only the paid orders will be in the collection.&lt;/p&gt;
&lt;h2&gt;Threading and runtime cache&lt;/h2&gt;
&lt;p&gt;Most of the time the in-memory runtime cache would be shared inside the application, since I’m mostly doing ASP.NET this would be all threads used by the webserver to process requests.&lt;/p&gt;
&lt;p&gt;Here we need to keep in mind that while one thread might be reading the cache, getting a reference to an object to read it – another thread might be in the processing of updating values on the same object, it might even be in the middle of this processes and depending on implementation the object might be in an invalid state (one property has been updated but not the other) causing errors on the read-side since the values do not make sense.&lt;/p&gt;
&lt;h2&gt;Solutions?&lt;/h2&gt;
&lt;p&gt;Going forward I can see a couple of things that would make it harder to “do it wrong”.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use un-cached business objects when modifying state. (ie. the method above should not read from the cache). This way we can safely apply changes to mutable objects and validate like in the sample above.&lt;/li&gt;
&lt;li&gt;Cache a “read-only”-representation of the underlying business object. This representation could be a CustomerReadOnly-class with private setters for all the properties. This way the consuming code can’t change the state by mistake.&lt;/li&gt;
&lt;li&gt;Use C# 9 record types, they are immutable so it's impossible to change the state of the cached object. If changes are needed on "the read side" a new instance of the record would have to be created - which will not impact the cached object. This way, any "implicit" changes to the cache are impossible.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is a lot more to this subject but I figured I’ll post this as a starting point.&lt;/p&gt;</description>
      <pubDate>Wed, 13 Oct 2021 11:46:06 Z</pubDate>
      <a10:updated>2021-10-13T11:46:06Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">d58505f3-6ca2-4d9a-a102-35bd613e61f5</guid>
      <link>https://www.enkelmedia.se/blogg/2021/8/31/debugging-javascript-and-typescript-with-jetbrains-rider?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Debugging Javascript and TypeScript with JetBrains Rider</title>
      <description>&lt;p&gt;Ever since I've started using &lt;a rel="noopener" href="https://www.jetbrains.com/rider/" target="_blank"&gt;JetBrains Rider&lt;/a&gt; I've become a huge fan of the IDE, if you have ever used Resharper for Visual Studio - Rider is Resharper - but fast =D&lt;/p&gt;
&lt;p&gt;Rider supports Javascript/TypeScript debugging with Chrome. Using this we can set breakpoints in our code and have the Rider show variables etc. when the client app executes. There are &lt;a rel="noopener" href="https://www.jetbrains.com/help/rider/Running_and_Debugging_TypeScript.html#ws_ts_run_debug_server_side" target="_blank" data-anchor="#ws_ts_run_debug_server_side"&gt;several ways&lt;/a&gt; to go this but we mostly develop on a local IIS instance which means that our dev-environments most of the time have a custom domain - ie enkelmedia.se.local or something like this.&lt;/p&gt;
&lt;h4&gt;Configure JS/TS build&lt;/h4&gt;
&lt;p&gt;Before we configure Rider we need to make sure that our Javascript code can be debugged. Most of the time we would use some tools to transpile, minify and process the source code into a Javascript bundle. For the debugger to work we must make sure to include the &lt;a rel="noopener" href="https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map" target="_blank"&gt;source maps&lt;/a&gt; in our build. When using Webpack this is configured like this: &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;module.exports = {
    ...
    devtool: &amp;#x27;inline-source-map&amp;#x27;,
    ...
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;One way to double-check that this works is to put a "console.log" in one of the typescript files and make sure that the console output in Chrome shows the .ts file as the source of the console.log-statement.&lt;/p&gt;
&lt;h4&gt;Configure Rider&lt;/h4&gt;
&lt;p&gt;We need to set up a custom "Debug Configuration" for the Javascript/Typescript debugging. Go to "Run | Edit Configurations" and add a new "Javascript Debug"-configuration, in the "URL" field paste the URL to the application we want to debug ie. "http://enkelmedia.se.local".&lt;/p&gt;
&lt;p&gt;To use this configuration, in the upper right corner choose the configuration from the dropdown and click the debug-icon (the bug). This will start a fresh instance of Google Chrome with the debugger attached.&lt;br&gt;&lt;br&gt;More information and documentation:&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://www.jetbrains.com/help/rider/Configuring_JavaScript_Debugger.html" target="_blank"&gt;https://www.jetbrains.com/help/rider/Configuring_JavaScript_Debugger.html&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 31 Aug 2021 07:21:08 Z</pubDate>
      <a10:updated>2021-08-31T07:21:08Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">fcc67a6d-14b4-48cd-892d-b4b805b2de53</guid>
      <link>https://www.enkelmedia.se/blogg/2021/6/11/10-things-every-umbraco-developer-should-know?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>10 things every Umbraco Developer should know</title>
      <description>&lt;p&gt;Today I held my talk on the yearly Umbraco Conference &lt;a rel="noopener" href="https://codegarden.umbraco.com" target="_blank"&gt;CodeGarden&lt;/a&gt;, due to the pandemic this year’s conference was all digital which turned out to be really good. I would like to thank everyone involved in making this a great experience it’s almost as great as the IRL experience.&lt;/p&gt;
&lt;p&gt;So my talk was on the subject “10 things every Umbraco-developer should know” and I’ll try to create a short summary here. If you want to go into details, go ahead and &lt;a rel="noopener" href="https://www.enkelmedia.se/media/28002/10-things-every-umbraco-developer-should-know-codegarden-2021-06-11.pdf" target="_blank" title="10 Things Every Umbraco Developer Should Know Codegarden 2021 06 11"&gt;download the slides&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;br&gt;1. Properties&lt;/h2&gt;
&lt;p&gt;A “Document Type” in Umbraco has “Properties”, these uses “Data Types” and a “Data Type” is a “Property Editor” with optional configuration.&lt;br&gt;A “Property Editor” can be used on any number of “Data Types” and a “Data Type” can be used on any number of “Document Types”.&lt;/p&gt;
&lt;p&gt;One can alter the behavior of the “Property Editor” using “Data Type”-configuration.&lt;/p&gt;
&lt;h2&gt;2. Property Value Converts&lt;/h2&gt;
&lt;p&gt;A Property Value Converter is a class that knows how to convert the stored value into something useful for the front end.&lt;br&gt;If we use the “Multi Node Tree Picker”, the data stored in the database would be like this:&lt;/p&gt;
&lt;p&gt;umb://document/ee82cba3a0e740639ae13026a4f72a3d,umb://document/9c1c3a2c72b045e2a3c33c068164a018,umb://document/3cce2545e3ac44ecbf55a52cc5965db3&lt;/p&gt;
&lt;p&gt;The “Property Value Converter” knows how to take this data and create a list of IPublishedContent-items from the cache to use on the front end.&lt;/p&gt;
&lt;p&gt;When you build your own Property Editors, don’t forget to create a Property Value Converter.&lt;/p&gt;
&lt;p&gt;Also, do try Callum Whyte’s package &lt;a rel="noopener" href="https://our.umbraco.com/packages/%20developer-tools/supervalueconverters/" target="_blank"&gt;Super Value Converters&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;3. Database vs Cache&lt;/h2&gt;
&lt;p&gt;When you “Save” content in Umbraco it’s is saved to the database, when you “Save and Publish” it’s stored in the database and also Published to the Cache.&lt;/p&gt;
&lt;p&gt;You should make sure that the front end of your website only uses the Cache to present data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do:&lt;/strong&gt; Use IPublishedContent, UmbracoHelper, and UmbracoContext.ContentCache&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Avoid:&lt;/strong&gt; Using IContent, ContentService, MediaService, and other services.&lt;/p&gt;
&lt;p&gt;Custom services, repositories, and background threads. In you’re your custom code the best approach to fetch data from the cache is to inject the IUmbracoContextFactory into your service.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class BlogService : IBlogService
    {
        private readonly IUmbracoContextFactory _contextFactory;
        private readonly IScopeProvider _scopeProvider;

        public BlogService(
            IUmbracoContextFactory contextFactory, 
            IScopeProvider scopeProvider)
        {
            _contextFactory = contextFactory;
            _scopeProvider = scopeProvider;
        }

        public List&amp;lt;BlogPost&amp;gt; GetPosts(string category)
        {
            using (var scope = _scopeProvider.CreateScope(autoComplete:true))
            {
                using (var ctx = _contextFactory.EnsureUmbracoContext())
                {
                    var blogContainer = ctx.UmbracoContext.ContentCache.GetById(1123);

                    var posts = blogContainer.Children.ToList();

                    return BlogPostMapper.Map(posts);
                }
            }
        }

    }&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;More details on why what is happening here can be found in this &lt;a rel="noopener" href="https://our.umbraco.com/forum/using-umbraco-and-getting-started/102676-triggering-index-rebuild-via-hangfire-causes-objectdisposedexception-in-nucache" target="_blank"&gt;thread on our.Umbraco.com&lt;/a&gt;-forum.&lt;/p&gt;
&lt;h2&gt; 4. Content Versions&lt;/h2&gt;
&lt;p&gt;All content in Umbraco is versioned. Every time you Save or Publish something in Umbraco a new version is created.&lt;/p&gt;
&lt;p&gt;On the "Info"-Content App on a Content-node you can see old versions and Rollback to them if you need to.&lt;/p&gt;
&lt;p&gt;You should avoid storing data that changes a lot (volatile data) as content in Umbraco. Ie. if you are running an import every 30 minutes, this creates 48 versions per day, in a year this is 17 520 versions.&lt;/p&gt;
&lt;p&gt;Solution? Use the &lt;a rel="noopener" href="https://our.umbraco.com/packages/%20website-utilities/unversion/" target="_blank"&gt;UnVersion&lt;/a&gt;-package that automatically cleans old versions.&lt;/p&gt;
&lt;p&gt;5. Modes Builder&lt;/p&gt;
&lt;p&gt;Provides strongly-typed models for the front end of your Umbraco website.&lt;/p&gt;
&lt;p&gt;Before Models builder, we had to get a property like this: @Model.GetPropertyValue("myProperty"), but with Models Builder we can go @Model.MyProperty to get the value in a strongly typed way.&lt;/p&gt;
&lt;p&gt;In V8, Models Builder is configured in web.config, and we tend to configure it like this:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;add key=&amp;quot;Umbraco.ModelsBuilder.Enable&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;
&amp;lt;add key=&amp;quot;Umbraco.ModelsBuilder.ModelsMode&amp;quot; value=&amp;quot;LiveAppData&amp;quot; /&amp;gt;
&amp;lt;add key=&amp;quot;Umbraco.ModelsBuilder.ModelsNamespace&amp;quot; value=&amp;quot;MySite.Web.Models.Cms&amp;quot; /&amp;gt;
&amp;lt;add key=&amp;quot;Umbraco.ModelsBuilder.ModelsDirectory&amp;quot; value=&amp;quot;~/../MySite.Web/Models/Cms&amp;quot; /&amp;gt;
&amp;lt;add key=&amp;quot;Umbraco.ModelsBuilder.AcceptUnsafeModelsDirectory&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The model-classes generated by Models Builder is just a wrapper around "IPublishedContent", you can create a new instance of a typed model and pass the IPublishedContent:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;IPublishedContent content = Umbraco.Content(4211);
var blogModel = new BlogPage(conten);
var title = blogModel.PageTitle;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;And since Models Builder makes the Umbraco cache return actual instances of the model classes you could just cast the IPublishedContent:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;IPublishedContent content = Umbraco.Content(4211);
var blogModel = content as BlogPage;
var title = blogModel.PageTitle;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;When using Composition, Models Builder will create C#-interfaces for these, and you can check if an instance implements this interface (hence is using the Composition):&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;IPublishedContent content = Umbraco.Content(4211);
string heroImageUrl = null;
if (content is IHero hero)
{
    heroImageUrl = hero.HeroImage.Url;
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;6. Debugging&lt;/h2&gt;
&lt;p&gt;Use the Log Viewer in the Settings section to view the logs and entries created by the website.&lt;/p&gt;
&lt;p&gt;Also, these files can be found on disc in /App_Data/Logs&lt;/p&gt;
&lt;p&gt;Use a tool like &lt;a rel="noopener" href="https://www.microsoft.com/en-us/p/compact-log-viewer/9n8rv8lktxrj#activetab=pivot:overviewtab" target="_blank" data-anchor="#activetab=pivot:overviewtab"&gt;Compact Log Viewer&lt;/a&gt; to watch the logs outside of the backoffice.&lt;/p&gt;
&lt;p&gt;Also, you can write to the log from your custom code:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;using Umbraco.Core.Logging;

public class MyThing : IMyThing
{
    private readonly ILogger _logger;
    
    public MyThing(ILogger logger)
    {
        _logger = logger;
    }
    
    public void DoSomething(string value)
    {
        _logger.Info&amp;lt;MyThing&amp;gt;($&amp;quot;My thing executed DoSomething()&amp;quot;);

    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;You can also use measure the performance of certain blocks in your code using the IProfilingLogger:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;using Umbraco.Core.Logging;

public class MyThing : IMyThing
{
    
    private readonly IProfilingLogger _profLog;

    public MyThing(IProfilingLogger profLog)
    {
        _profLog = profLog;
    }
    
    public void DoSomething(string value)
    {
        using (_profLog.TraceDuration&amp;lt;MyThing&amp;gt;(&amp;quot;Starting work&amp;quot;,&amp;quot;Done with work&amp;quot;))
        {
            Thread.Sleep(250);
        }
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;h2&gt; 7. Lucene / Examine&lt;/h2&gt;
&lt;p&gt;Examine is the built-in "Search Engine" in Umbraco, it used Lucene.NET to index Content, Media, and Members.&lt;/p&gt;
&lt;p&gt;It provides fast free text search and is great to perform filtering on large data sets, ie. a product or article filter.&lt;/p&gt;
&lt;p&gt;Some take away's:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Umbraco 8-cache (NuCache) is a lot faster than the V7-cache&lt;/li&gt;
&lt;li&gt;Prefer NuCache if you're working with less than 500 content nodes and few filtering options&lt;/li&gt;
&lt;li&gt;Use Examine/Lucene to filter larger data sets with many filtering options&lt;/li&gt;
&lt;li&gt;Do test what's best for you&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A more detailed presentation around this can be found &lt;a rel="noopener" href="https://umbracospark.com/media/p0xgaq2u/querying-umbraco.pptx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;8. Inversion of Control / Dependency Injection&lt;/h2&gt;
&lt;p&gt;The concept of injecting dependencies into your classes is a good practice and it becomes more important with Umbraco 9 that runs in .NET 5 where DI is a first-class citizen.&lt;/p&gt;
&lt;p&gt;LifeTimes in Umbraco 8 (LightInject)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Transient: A new instance every time&lt;/li&gt;
&lt;li&gt;Singleton: Same instance for the application lifetime&lt;/li&gt;
&lt;li&gt;Scope: New instance for every "Scope" in the DI-container. In Umbraco, this is for every web request.&lt;/li&gt;
&lt;li&gt;Request: New instance for every request to the container. This is similar to Transient. Avoid this.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;9.  NPoco&lt;/h2&gt;
&lt;p&gt;The "Micro ORM" used by Umbraco Core, used to read, update and delete data in the database. You can think of this as a "Lightweight and fast Entity Framework". You are free to use EF in your own code if you want to but you can also use NPoco:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class MovieRepository : IMovieRepository
{
    private readonly IScopeProvider _scopeProvider;

    public MovieRepository(IScopeProvider scopeProvider)
    {
        _scopeProvider = scopeProvider;
    }

    public bool Save(Movie movie)
    {
        return true;
    }

    public List&amp;lt;Movie&amp;gt; GetByYear(int year)
    {
        using (var scope = _scopeProvider.CreateScope(autoComplete:true))
        {
            var dtos = scope.Database.Fetch&amp;lt;MovieDto&amp;gt;(
                scope.SqlContext.Sql().SelectAll()
                    .From&amp;lt;MovieDto&amp;gt;()
                    .Where&amp;lt;MovieDto&amp;gt;(x=&amp;gt;x.Year == year));

            return MovieMapper.Map(dtos);
            
        }
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;The Scope's created but IScopeProvider can be nested, but: &lt;strong&gt;Don't forget to "Complete" your scopes&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;10. AngularJS hacks for the backoffice.&lt;/h2&gt;
&lt;p&gt;You can use AngularJS's $httpProvider.interceptors to intercept requests/responses to/from the Umbraco backoffice APIs.&lt;/p&gt;
&lt;p&gt;This is useful if you would like to alter the response coming back from the API in any way. One example is to remove the default "Consent"-field that is included when creating a new form in Umbraco Forms.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;angular.module(&amp;#x27;umbraco.services&amp;#x27;).config([
   &amp;#x27;$httpProvider&amp;#x27;, function ($httpProvider) {
       $httpProvider.interceptors.push([&amp;#x27;$q&amp;#x27;,&amp;#x27;$injector&amp;#x27;, function ($q, $injector) {
           return {
               
               &amp;#x27;response&amp;#x27;: function(response) {

                   // Overrides the response from the API-endpoint that created the Forms, 
                   // The controller is hardcoded to always append the &amp;quot;data consent&amp;quot;-field as the last field in the collection
                   // So by running pop() on the collection.

                   // Does the returned content match the endpoint for GetScaffoldWithWorkflows?
                   if (response.config.url.indexOf(&amp;#x27;backoffice/UmbracoForms/Form/GetScaffoldWithWorkflows?template=&amp;#x27;) &amp;gt; -1) {
                       response.data.pages[0].fieldSets[0].containers[0].fields.pop();
                   }

                   return response;
               }
               
           };
       }]);

   }]);&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;You need to include this javascript in the backoffice using a &lt;a rel="noopener" href="https://our.umbraco.com/documentation/extending/property-editors/package-manifest" target="_blank"&gt;package.manifest&lt;/a&gt;-file.&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jun 2021 14:43:55 Z</pubDate>
      <a10:updated>2021-06-11T14:43:55Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">871bb4a8-4173-493f-bd91-69e16ee3428f</guid>
      <link>https://www.enkelmedia.se/blogg/2021/3/31/iis-http-error-500-19-with-umbraco-and-other-sites?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>IIS - HTTP Error 500.19 with Umbraco and other sites</title>
      <description>&lt;p&gt;When starting up a Umbraco website on a fresh install of IIS, I sometimes get this error:&lt;/p&gt;
&lt;p&gt;HTTP Error 500.19&lt;/p&gt;
&lt;p&gt;There is not much more information, the error that says: &lt;em&gt;The requested page cannot be accessed because the related configuration data for the page is invalid&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;One can open the "Event Viewer" that might reveal more information, but many times there is no additional information to be found here either.&lt;/p&gt;
&lt;p&gt;The first thing I check is the permission settings for the folders, after this one could just try to remove elements from web.config to figure out what inside web.config that is considered "invalid". Since I work a lot with Umbraco, MOST of the time the problem is the &amp;lt;rewrite&amp;gt;-element. Without the right components installed on server these elements will be unknown to IIS and considered invalid.&lt;/p&gt;
&lt;h4&gt;What do to?&lt;/h4&gt;
&lt;p&gt;Here are some thing to check if you get the HTTP Error 500.19 when trying to run Umbraco on a Windows IIS-server.&lt;/p&gt;
&lt;h3&gt;Ensure Permissions&lt;/h3&gt;
&lt;p&gt;Make sure that the IIS-user for the application pool (usually IIS_IUSRS) have full read/write access to the folders for the web-app.&lt;/p&gt;
&lt;h3&gt;Ensure DOTNET runtime&lt;/h3&gt;
&lt;p&gt;To run a modern ASP.NET (aka Core) application we need the "Hosting Bundle" to be installed on the server, it can be downloaded from the &lt;a rel="noopener" href="https://dotnet.microsoft.com/en-us/download" target="_blank"&gt;.NET website&lt;/a&gt; click on "All .NET X.0 downloads" and then download and install the "Hosting Bundle".&lt;/p&gt;
&lt;h3&gt;Ensure URL ReWrite&lt;/h3&gt;
&lt;p&gt;If you have the &amp;lt;rewrite&amp;gt;-element with &amp;lt;rules&amp;gt; configured in web.config make sure that you have installed "URL Rewrite":&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download "URL Rewrite Module 2.1" from &lt;a rel="noopener" href="https://www.iis.net/downloads/microsoft/url-rewrite" target="_blank"&gt;Microsofts website&lt;/a&gt; (scroll to the bottom of the page).&lt;/li&gt;
&lt;li&gt;Run the installer&lt;/li&gt;
&lt;li&gt;Restart IIS to be on the safe side.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:40:21 Z</pubDate>
      <a10:updated>2021-03-31T08:40:21Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">6eef86ad-72bf-4862-b79a-4ab2a80afdaa</guid>
      <link>https://www.enkelmedia.se/blogg/2021/1/19/unit-tests-with-input-data-as-assembly-resources?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Unit tests with input data as assembly resources</title>
      <description>&lt;p&gt;When running unit tests over "complex" data ie. an html, XML, or json-file it's sometimes good to keep this data in its own file and not in the C# code like this:&lt;/p&gt;
&lt;p&gt;&lt;img style="width: 307px; height: 330px;" src="https://www.enkelmedia.se/media/28000/unit-test-data-included-files.png?width=307&amp;amp;height=330" alt=""&gt;&lt;/p&gt;
&lt;p&gt;The example above is from one of our utility projects for Umbraco where we're parsing the grid to remove any empty p-tags from the end of a Rich Text Editor. To really know that this works and also keeps working we've created unit tests for different kinds of grid input.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;First off, we need to include the files in the project and then set there "Build Action" to "Embedded Resource", right-click on the file, and choose "Properties" to see this options pane:&lt;/p&gt;
&lt;p&gt;&lt;img style="width: 352px; height: 233px;" src="https://www.enkelmedia.se/media/27999/unit-test-data-build-action.png?width=352&amp;amp;height=233" alt=""&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;After this we can read the content of the files like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var content = new AssemblyTestData&amp;lt;MyUnitTestClass&amp;gt;(&amp;quot;.Files.&amp;quot;).ReadString(&amp;quot;test-data.json&amp;quot;);&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;Here's the code for the AssemblyTestData-class:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;// &amp;lt;summary&amp;gt;
/// Utility to read content of embedded assembly resources
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;The calling type, used to get the resource namespace&amp;lt;/typeparam&amp;gt;
public class AssemblyTestData&amp;lt;T&amp;gt;
{
    private readonly string _additionalNameSpace;

    /// &amp;lt;summary&amp;gt;
    /// 
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;additionalNameSpace&amp;quot;&amp;gt;If the files to read is in another namespace than the calling class, add this here ie &amp;quot;.Files&amp;lt;/param&amp;gt;
    public AssemblyTestData(string additionalNameSpace = &amp;quot;&amp;quot;)
    {
        _additionalNameSpace = additionalNameSpace;
    }

    public string ReadString(string filename)
    {
        var bytes = ReadBytes(filename);
        
        return Encoding.UTF8.GetString(bytes)
            .Trim(new char[]{&amp;#x27;\uFEFF&amp;#x27;,&amp;#x27;\u200B&amp;#x27;}); // Removes boom-chars

    }

    public byte[] ReadBytes(string filename)
    {
        var type = typeof(T);
        var assembly = type.Assembly;
        var stream = assembly.GetManifestResourceStream(type.Namespace + _additionalNameSpace + filename);

        using (var memoryStream = new MemoryStream())
        {
            stream.CopyTo(memoryStream);
            return memoryStream.ToArray();
        }
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;Happy testing!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Tue, 19 Jan 2021 09:21:19 Z</pubDate>
      <a10:updated>2021-01-19T09:21:19Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ef3996a4-3913-45e9-a1af-43d3b7d15809</guid>
      <link>https://www.enkelmedia.se/blogg/2021/1/15/umbraco-and-miniprofiler?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco and MiniProfiler</title>
      <description>&lt;p&gt;Umbraco CMS ships with the great MiniProfiler both with Umbraco 7 and 8.&lt;br&gt;&lt;br&gt;I'm not going to repeat everything from the &lt;a rel="noopener" href="https://our.umbraco.com/documentation/getting-started/Code/Debugging/" target="_blank"&gt;documentation&lt;/a&gt; but today when I wanted to see some profiling for a backoffice API-controller I'm working on I found that it's really easy to show the profiler logs by going to &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;https://mysite.com/mini-profiler-resources/results-index&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2021 16:23:56 Z</pubDate>
      <a10:updated>2021-01-15T16:23:56Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">b36c9c3e-6ed3-4398-a633-4ad80ca4e9da</guid>
      <link>https://www.enkelmedia.se/blogg/2020/12/21/windows-terminal-with-git-and-right-click-menu?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Windows Terminal with git and right click menu</title>
      <description>&lt;p&gt;I recently played around with Microsoft's new "Windows Terminal", a great new tool for working with different command-line tools in Windows.&lt;br&gt;&lt;br&gt;I use the following setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First, download Windows Terminal from here &lt;a rel="noopener" href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701" target="_blank"&gt;https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Add context menu action so that we can right-click a folder and choose "Windows Terminal here". &lt;a rel="noopener" href="https://dev.to/brojenuel/windows-terminal-context-menu-how-to-setup-35oo" target="_blank"&gt;https://dev.to/brojenuel/windows-terminal-context-menu-how-to-setup-35oo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Setup the Cascadia Code-font to use git in a nice way: &lt;a rel="noopener" href="https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup" target="_blank"&gt;https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup&lt;/a&gt;&lt;a rel="noopener" href="https://www.hanselman.com/blog/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh" target="_blank"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;My default setup for the Windows Terminal settings looks like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;quot;defaults&amp;quot;:
{
    
    // Put settings here that you want to apply to all profiles.
    &amp;quot;colorScheme&amp;quot;: &amp;quot;One Half Dark&amp;quot;, //&amp;quot;Tango Dark&amp;quot;,
    &amp;quot;fontFace&amp;quot;: &amp;quot;Cascadia Code PL&amp;quot;,

    &amp;quot;useAcrylic&amp;quot; : true,
    &amp;quot;acrylicOpacity&amp;quot; : 0.9,

    &amp;quot;startingDirectory&amp;quot;: &amp;quot;.&amp;quot; //add this

},&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt; Also if you want the git-bash as one of the options on the dropdown for shells, just add this to the "list"-property in the Windows Terminal settings:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;{
    &amp;quot;guid&amp;quot; : &amp;quot;{14ad203f-52cc-4110-90d6-d96e0f41b64d}&amp;quot;,
    &amp;quot;name&amp;quot; : &amp;quot;Git Bash&amp;quot;,
    &amp;quot;historySize&amp;quot; : 9001,
    &amp;quot;commandline&amp;quot; : &amp;quot;C:/Program Files/Git/usr/bin/bash.exe --login&amp;quot;,
    &amp;quot;icon&amp;quot; : &amp;quot;C:/Program Files/Git/mingw32/share/git/git-for-windows.ico&amp;quot;,
    
    &amp;quot;useAcrylic&amp;quot; : true,
    &amp;quot;acrylicOpacity&amp;quot; : 0.9,
    
    &amp;quot;padding&amp;quot; : &amp;quot;0, 0, 0, 0&amp;quot;,
    &amp;quot;snapOnInput&amp;quot; : true

}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;Note: The path to git might be different, sometimes something like c:/program files (x86)/&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 21 Dec 2020 08:49:19 Z</pubDate>
      <a10:updated>2020-12-21T08:49:19Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ee3d7ab5-20a0-4ebf-9367-ad754783e4e5</guid>
      <link>https://www.enkelmedia.se/blogg/2020/7/16/thinking-loud-about-naming-models-dtos-web-api-models-view-models-and-so-on?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Thinking loud about naming models, DTOs, web api models, view models and so on</title>
      <description>&lt;p&gt;I've found myself thinking a lot about a good naming strategy or naming convention for website projects that works with data in &lt;span id="osc_tag_system_1" class="osc_tag_system osc_error_green"&gt;several&lt;/span&gt;&lt;span&gt; &lt;/span&gt;different formats. Before I start to outline my current ideas (might change over time) I would like to set the stage for the project.&lt;/p&gt;
&lt;p&gt;Let's say we have a website project with the all of these "features":&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A rich domain model with domain entities&lt;/li&gt;
&lt;li&gt;A database to store state of the domain model including repositories&lt;/li&gt;
&lt;li&gt;A MVC front end&lt;/li&gt;
&lt;li&gt;A web api aimed for the front end website (not 3rd party integrations)&lt;/li&gt;
&lt;li&gt;A public web api for 3rd party integration's&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now comes the challenge, all of these different touch points/end points into the system often needs to represent the same thing/entity. We've been &lt;span id="osc_tag_system_10" class="osc_tag_system osc_error_blue"&gt;taught&lt;/span&gt;&lt;span&gt; &lt;/span&gt;that for one should not use the domain entity as view model in a MVC-view, we should have a dedicated type that acts as the view model, the problem is that each of these end points probably needs a dedicated type which presents us with a problem that I've had a really hard time to find a perfect solution for:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How should we name all these dedicated types/classes?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First of all, these special representations of the core rich domain model entities are all DTOs (data transfer objects) but since we probably need these DTOs to look different depending on the context we need to name them in a smart and understandable way. The goal would be that a developer should be able to understand what "type of DTO" the code is working with by looking at the type name.&lt;/p&gt;
&lt;p&gt;So let's start with some ideas and let's say that the core domain model that we're working here is type called Car.&lt;/p&gt;
&lt;h2&gt;MVC-view model&lt;/h2&gt;
&lt;p&gt;This one is quite simple, a very common practice is to suffix the core entity with ViewModel.&lt;/p&gt;
&lt;p&gt;Idea: CarViewModel.&lt;/p&gt;
&lt;h2&gt;Database mapping DTO&lt;/h2&gt;
&lt;p&gt;In most of my solutions I use a repository that will take in the domain model and store it's state, the repository also returns instances of domain entities. During this process we need to map the domain entity to a model that is suitable for the storage we're using. Let's say a database. So most of the time I would represent the database table as a DTO.&lt;br&gt;&lt;br&gt;Idea: CarDto&lt;/p&gt;
&lt;h2&gt;Model for website frontend APIs&lt;/h2&gt;
&lt;p&gt;Here we're talking about features on the website that make async javascript requests to the backend, something like a filter, a search feature, auto suggest or what ever. These are "ApiModel" but they are used in a context where they've probably will end up as some kind of "view model" when they are rendered into the website. I'm quite sure that this kind of model is different from the model used in public APIs for 3rd &lt;span&gt;parties, &lt;/span&gt;so I would like to use a naming convention for them that makes it clear that they are used only for the website.&lt;/p&gt;
&lt;p&gt;Idea: CarFrontendModel&lt;/p&gt;
&lt;h2&gt;Model for public API for 3rd parties&lt;/h2&gt;
&lt;p&gt;Here we're talking about model types for a external public web api if we're implementing a API that is restful these models could be called a Resource or a ApiModel. I like the idea of calling the "Resource" since a restful api could/shuld have navigation-properties etc. So in this case the "CarResource" might have links to a BrandResource or a "DealerResource". I'm very hesitant about this one but one has to come up with something.&lt;/p&gt;
&lt;p&gt;Idea: CarResource&lt;/p&gt;
&lt;p&gt;&lt;br&gt;I had two main &lt;span id="osc_tag_system_53" class="osc_tag_system osc_error_green"&gt;purposes&lt;/span&gt;&lt;span&gt; &lt;/span&gt;of writing this blog post, first one is to document and share my ideas and the &lt;span id="osc_tag_system_54" class="osc_tag_system osc_error_green"&gt;second&lt;/span&gt;&lt;span&gt; &lt;/span&gt; is to get input and/or feedback. If you feel that you have other thoughts around this, please share in the comments! &lt;br&gt;&lt;br&gt;Note: I might (and almost hope) that I'll change my conclusions above based on more &lt;span id="osc_tag_system_55" class="osc_tag_system osc_error_green"&gt;experience&lt;/span&gt;&lt;span&gt; &lt;/span&gt;and feedback.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 16 Jul 2020 11:16:47 Z</pubDate>
      <a10:updated>2020-07-16T11:16:47Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e598f102-9a4f-4bda-b7d0-622e504784dd</guid>
      <link>https://www.enkelmedia.se/blogg/2020/6/3/remove-record-from-umbraco-forms-8-workflow?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Remove Record from Umbraco Forms 8 Workflow</title>
      <description>&lt;p&gt;When working with &lt;a rel="noopener" href="https://umbraco.com/products/umbraco-forms/" target="_blank"&gt;Umbraco Forms&lt;/a&gt; there are some scenarios when you want to extend the functionality to perform something custom. Every time a Form is submitted a new Record is created for this Form, this Record is stored in the database and also passed to all &lt;a rel="noopener" href="https://our.umbraco.com/documentation/Add-ons/umbracoforms/editor/attaching-workflows/" target="_blank"&gt;Workflows&lt;/a&gt; that are configured on the form.&lt;/p&gt;
&lt;p&gt;In our case we wanted to implement a &lt;a rel="noopener" href="https://en.wikipedia.org/wiki/Honeypot_(computing)" target="_blank"&gt;HoneyPot&lt;/a&gt; to avoid some of the SPAM that comes through the forms so in cases we wanted to be able to remove a record from a &lt;a rel="noopener" href="https://our.umbraco.com/documentation/Add-ons/umbracoforms/developer/extending/adding-a-workflowtype" target="_blank"&gt;custom WorkflowType&lt;/a&gt;. I found some &lt;a rel="noopener" href="https://our.umbraco.com/forum/umbraco-forms/88167-delete-entry" target="_blank"&gt;solutions for Umbraco 7&lt;/a&gt; but non of these worked on Umbraco 8 so I got my hands dirty and started to implement this. &lt;/p&gt;
&lt;p&gt;I did not find a way to remove the Record from within the Workflows Execute()-method since everything I tried caused exceptions. I managed to solve it by firing of a Task that runs some time after the Record has been created. &lt;/p&gt;
&lt;p&gt;Here's the code that we used:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class DeleteWorkflow : WorkflowType
{
    public DeleteWorkflow()
    {
        this.Id = new Guid(&amp;quot;466BAB6D-ECF1-4BE8-B0E7-6C6ACC495565&amp;quot;);
        this.Name = &amp;quot;Delete Record&amp;quot;;
        this.Description = &amp;quot;Deletes the record from the Database&amp;quot;;
        this.Icon = &amp;quot;icon-delete&amp;quot;;
    }
    

    public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
    {
        Task.Run(() =&amp;gt; DeleteRecordWithDelay(record.UniqueId.ToString(),record.Form.ToString()));

        return WorkflowExecutionStatus.Completed;
    }


    public override List&amp;lt;Exception&amp;gt; ValidateSettings()
    {
        return new List&amp;lt;Exception&amp;gt;();
    }

    
    public static async Task DeleteRecordWithDelay(string recordId,string formId)
    {
        await Task.Delay(5000);

        try
        {
        
            IRecordService recordService = DependencyResolver.Current.GetService&amp;lt;IRecordService&amp;gt;();
            IRecordStorage recordStorage = DependencyResolver.Current.GetService&amp;lt;IRecordStorage&amp;gt;();
            IFormService formService = DependencyResolver.Current.GetService&amp;lt;IFormService&amp;gt;();
        
            var form = formService.GetForm(Guid.Parse(formId));
            var record = recordStorage.GetRecordByUniqueId(Guid.Parse(recordId), form);
        

            recordService.Delete(record, form);
        }
        catch (Exception e)
        {

            var exception = e.Message;
            throw;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;
</description>
      <pubDate>Wed, 03 Jun 2020 07:53:50 Z</pubDate>
      <a10:updated>2020-06-03T07:53:50Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">48d7df3f-90a0-40c5-abbf-7a03ab87b581</guid>
      <link>https://www.enkelmedia.se/blogg/2020/3/22/using-less-with-umbraco-and-system-web-optimizations?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Using Less with Umbraco and System.Web.Optimizations</title>
      <description>&lt;p&gt;When you want to combine and minify your JavaScript and CSS there’s a lot of options out there. Mainly you can either do this in your build process or perform this “on demand” from the server side of your website. When it comes to performance the first option, to actually deploy the processed assets, is probably the most efficient but I often prefer to take the cost of processing this on the server side using something like Microsoft.AspNet.Web.Optimization or ClientDependency Framwork (ships with Umbraco).&lt;/p&gt;
&lt;p&gt;In this post I’ll explain the steps needed to use Microsofts Web.Optimization-framework and the 3rd party package &lt;a rel="noopener" href="https://github.com/scott-xu/System.Web.Optimization.Less" target="_blank"&gt;System.Web.Optimization.Less&lt;/a&gt; to be able to process use .less-files on the server.&lt;/p&gt;
&lt;p&gt;Note: The Less-package that I’m using needs at least .NET Framework 4.6.1 to run, so before going further, make sure that you’re project runs on at least .NET Framework 4.6.1.&lt;/p&gt;
&lt;p&gt;First of, we need to install the two packages that we’re going to use:&lt;/p&gt;
&lt;p&gt;&lt;span class="nuget-command"&gt;&lt;a rel="noopener" href="https://www.nuget.org/packages/Microsoft.AspNet.Web.Optimization/" target="_blank"&gt;Install-Package Microsoft.AspNet.Web.Optimization&lt;/a&gt;&lt;/span&gt;&lt;br&gt;and&lt;/p&gt;
&lt;p&gt;&lt;span class="nuget-command"&gt;&lt;a rel="noopener" href="https://www.nuget.org/packages/System.Web.Optimization.Less" target="_blank"&gt;Install-Package System.Web.Optimization.Less&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you're on Umbraco 7 you need to make sure that you're using the right versions of the packages, I would recommend installtion them in this order:&lt;br&gt;&lt;br&gt;* Install-Package Microsoft.AspNet.Web.Optimization -version 1.1.3&lt;br&gt;* Install-Package dotless &lt;span&gt;-version 1.5.2&lt;br&gt;&lt;/span&gt;* Install-Package System.Web.Optimization.Less -version 1.3.4&lt;/p&gt;
&lt;p&gt;This is beacure the "dotless" package made breaking changes in version 1.6+ but some NuGet package does not explicity state the dependency to be for dotless &amp;lt; 1.6.&lt;br&gt;&lt;br&gt;After installing these packages we need to configure our bundle during startup. For a vanilla MVC-project this would be done in &lt;a rel="noopener" href="https://www.c-sharpcorner.com/UploadFile/abhijmk/how-to-use-Asp-Net-web-optimization-framework-in-Asp-Net-mvc/" target="_blank"&gt;Global.asax&lt;/a&gt; but when we're running Umbraco we can avoid having to fiddle with Global.asax by creating our own ApplicationEventHandler (for V7) or UserComponent (for V8).&lt;/p&gt;
&lt;p&gt;Before we configure our bundles we need to make sure that the path we're using for our bundles is ignored by Umbraco, otherwise we might get issues with 404-responses from the bundle. Make sure the root web.config contains a appSettings that looks something like this: &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;add key=&amp;quot;umbracoReservedPaths&amp;quot; value=&amp;quot;~/umbraco,~/install/,~/bundles/&amp;quot;/&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; Then we can start to configure our bundle, when running Umbraco 7 it would look something like this&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class UmbracoStartup : ApplicationEventHandler
{
    protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
    {
        this.RegisterBundles(BundleTable.Bundles);
    }

    public void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle(&amp;quot;~/bundles/js&amp;quot;) 
            .Include(&amp;quot;~/Scripts/site.js&amp;quot;)
        );

        bundles.Add(new LessBundle(&amp;quot;~/bundles/css&amp;quot;)
            .Include(&amp;quot;~/Style/site.less&amp;quot;)
        );
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; Then in your views you'll render the bundle links like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;@Styles.Render(&amp;quot;~/bundles/css&amp;quot;)&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;After this the bundle will be rendered on the front end of the website, please note that it behaves differently depending on the system.web -&amp;gt; compilation -&amp;gt; debug setting in the root web.config:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Debug = true (for development):&lt;/strong&gt; Each file in the bundle is referenced with it's own &amp;lt;script&amp;gt;-tag&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debug = false (for production):&lt;/strong&gt; Files and bundles (and minified if configured).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A good practice is to test both these settings in your development environment to make sure that everything works.&lt;/p&gt;</description>
      <pubDate>Sun, 22 Mar 2020 13:31:25 Z</pubDate>
      <a10:updated>2020-03-22T13:31:25Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">04f11dea-d0ea-412c-b8ce-d7bd5ce07e34</guid>
      <link>https://www.enkelmedia.se/blogg/2020/3/10/umbraco-8-and-custom-collectionbuilders?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco 8 and custom CollectionBuilders</title>
      <description>&lt;p&gt;A very nice feature in the latest version of Umbraco (8.0+) is that they’ve made it really easy to implement your own CollectionBuilders. This raises two obvious questions:&lt;/p&gt;
&lt;h4&gt;What is a CollectionBuilder?&lt;/h4&gt;
&lt;p&gt;A collection builder is used to create a collection of Types, the main purpose being a collection of types that you would like to keep in a certain order. Umbraco uses this to register stuff like ContentFinders, Components and lots of other things.&lt;br&gt;The syntax looks something like this:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;// Append
composition.Components().Append&amp;lt;MyCustomComponent&amp;gt;()
// Insert After
composition.Components().InsertAfter&amp;lt;MyCustomComponent,AnotherComponent&amp;gt;()&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;By leverage this feature you can create your own collection of types and make sure that the concrete instances in the collection is sorted in the way you want.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;h4&gt;How would I implement a custom CollectionBuilder?&lt;/h4&gt;
&lt;p&gt;We’re basically looking at 3 small pieces that we need to get this in place. Let’s say that we have a type called ITextProcessor with multiple different implementations that we need to store in our custom collection in a given order. We’ll start with the collection it self by creating a new class that inherits from BuilderCollectionBase, all we need to do is to pass the type we want to store in the collection as a type parameter and implement the default constructor: &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class TextProcessorsCollection : BuilderCollectionBase&amp;lt;ITextProcessor&amp;gt;
{
    public TextProcessorsCollection (IEnumerable&amp;lt; ITextProcessor &amp;gt; items) : base(items)
    {
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; Next up is the “Collection Builder” it self, here we inherit from “OrderedCollectionBuilderBase” and pass 3 type parameters:&lt;br&gt;1. The builder type it self&lt;br&gt;2. The collection type&lt;br&gt;3. The type of the items in the collection&lt;/p&gt;
&lt;p&gt;&lt;br&gt;And also implement one single property, “This”. It should look something like:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class TextProcessorsCollectionBuilder :
OrderedCollectionBuilderBase&amp;lt; TextProcessorsCollectionBuilder, TextProcessorsCollection,ITextProcessor&amp;gt;
{
    protected override TextProcessorsCollectionBuilder This =&amp;gt; this;
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; The last thing we should do is to implement an extension method so the builder will be easy to use during composition, let’s create one like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public static class TextProcessorsCollectionExtensions
{
    public static TextProcessorsCollectionBuilder TextProcessors(this Composition composition)
=&amp;gt; composition.WithCollectionBuilder&amp;lt; TextProcessorsCollectionBuilder &amp;gt;();
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;After this we can work with our list during Composition using the extension method like so:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class MySiteComposer : IUserComposer
{
    public void Compose(Composition composition)
    {
    composition.TextProcessors().Append&amp;lt;RemoveSpaceTextProcessor&amp;gt;();
    composition.TextProcessors().Append&amp;lt;AddLineBreaksTextProcessor&amp;gt;();
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; When we want to use the list in our code, we can get it from the IOC-container, prefferebly using consrtructor injection&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class MyController : SurfaceController
{
    public void MyController(TextProcessorsCollection textProcessors)
    {
        // Save as local variable
    }
}&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;
</description>
      <pubDate>Tue, 10 Mar 2020 13:48:40 Z</pubDate>
      <a10:updated>2020-03-10T13:48:40Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ada01a94-3709-4bdc-b9a4-62d7cb37817a</guid>
      <link>https://www.enkelmedia.se/blogg/2019/10/31/version-history-umbraco-7-and-umbraco-8?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Version History Umbraco 7 and Umbraco 8</title>
      <description>&lt;p&gt;Here's a summery of major features and improvements with each major/minor release of Umbraco CMS, you can see this as an overview of the great &lt;a href="https://our.umbraco.com/download/releases/"&gt;detailed release information&lt;/a&gt; that Umbraco HQ provides with each release.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.0&lt;/h2&gt;
&lt;p&gt;Released: 2013-11-21&lt;/p&gt;
&lt;p&gt;A major release that introduced the new AngularJS-based backoffice, new "property editors" for data types and a lot of improvements in the editor experience.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/700"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.1&lt;/h2&gt;
&lt;p&gt;Released: 2014-04-03&lt;/p&gt;
&lt;p&gt;This release was mainly a "polish"-release that fixed bugs and brought features that did not make it into 7.0.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Image Cropper in the core&lt;/li&gt;
&lt;li&gt;Breadcrumbs and warnings (discard changed-dialog when leaving a view without saving)&lt;/li&gt;
&lt;li&gt;Change document type&lt;/li&gt;
&lt;li&gt;API: MemberService introduced.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/710"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.2&lt;/h2&gt;
&lt;p&gt;Released: 2014-12-04&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grid property editor was added&lt;/li&gt;
&lt;li&gt;Responsive preview mode (switch between desktop, mobile and tablet)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/720"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.3&lt;/h2&gt;
&lt;p&gt;Released: 2015-09-29&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improved load balancing&lt;/li&gt;
&lt;li&gt;Upgrade to MVC5 &amp;amp; WebApi2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/730"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.4&lt;/h2&gt;
&lt;p&gt;Released: 2016-02-11&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New Content Type (Document Type) editor&lt;/li&gt;
&lt;li&gt;Models Builder&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/740"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.5&lt;/h2&gt;
&lt;p&gt;Released: 2014-08-17&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Health Check dashboard introduced&lt;/li&gt;
&lt;li&gt;301 redirect manager&lt;/li&gt;
&lt;li&gt;Image Processor security improvements&lt;/li&gt;
&lt;li&gt;Password recovery for backoffice&lt;/li&gt;
&lt;li&gt;Package Installer UI updated and "target version" for packages.&lt;/li&gt;
&lt;li&gt;Sortable property types in list views&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/750"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.6&lt;/h2&gt;
&lt;p&gt;Released: 2017-05-02&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New editor for scripts and templates&lt;/li&gt;
&lt;li&gt;Content/media/members-pickers (property editors) was improved&lt;/li&gt;
&lt;li&gt;Color-changes to backoffice UI&lt;/li&gt;
&lt;li&gt;List View Pickers&lt;/li&gt;
&lt;li&gt;UDIs was introduced&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/760"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.7&lt;/h2&gt;
&lt;p&gt;Released: 2017-09-19&lt;/p&gt;
&lt;p&gt;This release introduced the new "User Management" and also changed some of the details around how users and passwords are stored. This version is "milestone" when upgrading old sites, I've had to install this specific version to the things right.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New User Management, more focus on settings on User Groups
&lt;ul&gt;
&lt;li&gt;Invite Users&lt;/li&gt;
&lt;li&gt;Multiple Start Nodes&lt;/li&gt;
&lt;li&gt;Big UI-improvements&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Introduced "Content Templates"&lt;/li&gt;
&lt;li&gt;New starterkit&lt;/li&gt;
&lt;li&gt;Scheduled Health Checks&lt;/li&gt;
&lt;li&gt;Includes Nested Content in the core&lt;/li&gt;
&lt;li&gt;ISerachableTree-interface for custom search in the tree&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/770"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.8&lt;/h2&gt;
&lt;p&gt;Released: 2018-02-06&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Backoffice Tours introduced (Step-by-step introductions/support)&lt;/li&gt;
&lt;li&gt;The "Info"-tab replaced the "Generic Properties"-tab&lt;/li&gt;
&lt;li&gt;Improvements to Load Balancing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/780"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.9&lt;/h2&gt;
&lt;p&gt;Released: 2018-02-27&lt;/p&gt;
&lt;p&gt;This released was called the "GDPR-release" and introduced some tooling around "consent" from visitors.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The ConsentService API was introduced&lt;/li&gt;
&lt;li&gt;Logging of User actions in the backoffice was improved&lt;/li&gt;
&lt;li&gt;Member properties can be marked as "Sensitive Data" and hidden from some backoffice User Groups.&lt;/li&gt;
&lt;li&gt;Export Member data to a file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/790"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.10&lt;/h2&gt;
&lt;p&gt;Released: 2018-03-27&lt;/p&gt;
&lt;p&gt;This release does not contains a lots of features and was probably release to be able to ship the breaking change with TypedContent and Guids.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improved performance for querying UmbracoHelper.TypedContent with Guids&lt;/li&gt;
&lt;li&gt;Dropdown property editor was improved&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/7100"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.11&lt;/h2&gt;
&lt;p&gt;Released: 2018-06-19&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;See where Composition Content Types are being used&lt;/li&gt;
&lt;li&gt;Dictionary Tree modernized (aka moved from WebForms to AngularJS)&lt;/li&gt;
&lt;li&gt;Multilingual tours&lt;/li&gt;
&lt;li&gt;Cancel-events from ContentService-event handlers now shown to the user.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/7110"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.12&lt;/h2&gt;
&lt;p&gt;Released: 2018-08-14&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Folders for Content Types (aka Document Types)&lt;/li&gt;
&lt;li&gt;Nested Content filtering content types&lt;/li&gt;
&lt;li&gt;Visual Color Picker for content type colors&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/7120"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.13&lt;/h2&gt;
&lt;p&gt;Released: 2019-01-08&lt;/p&gt;
&lt;p&gt;The "Community-release" with 172 improvements, bug fixes and so on.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SVG-support for media / media pickers&lt;/li&gt;
&lt;li&gt;Better image search&lt;/li&gt;
&lt;li&gt;Media item deletion detection (the "Trashed"-alert on media that has been deleted)&lt;/li&gt;
&lt;li&gt;Media file type indicators (icons for doc,pdf etc)&lt;/li&gt;
&lt;li&gt;Performance improvements, site-startup&lt;/li&gt;
&lt;li&gt;UX: Color pickers improvements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/7130"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.14&lt;/h2&gt;
&lt;p&gt;Released: 2019-03-12&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi Url Picker added to Core&lt;/li&gt;
&lt;li&gt;Helth Check for TLS 1.2&lt;/li&gt;
&lt;li&gt;UX-improvements to Image Cropper, SVG, Toggles and more&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/7140"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 7.15&lt;/h2&gt;
&lt;p&gt;Released: 2019-07-09&lt;/p&gt;
&lt;p&gt;The final Umbraco version 7 minor release. NOTE! This version was patched with 7.15.1 due to a bug in the media tree.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;.NET Framework update to 4.5.2&lt;/li&gt;
&lt;li&gt;New Preview engine&lt;/li&gt;
&lt;li&gt;Updates to EntityService (breaking)&lt;/li&gt;
&lt;li&gt;Pickers: "Ignore User Start Nodes"-setting&lt;/li&gt;
&lt;li&gt;Bugfixes for CPU usage when not running the backoffice on the /umbraco-route&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/7150"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.0&lt;/h2&gt;
&lt;p&gt;Released: 2019-02-26&lt;/p&gt;
&lt;p&gt;A new major-version of Umbraco with lot's of updates and breaking changes. A cleaned up code base where all legacy code (aka WebForms) has been removed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New backoffice UI&lt;/li&gt;
&lt;li&gt;Introduced "Infinite Editing" - edit doctypes, media and content in a "modal" and not switch context.&lt;/li&gt;
&lt;li&gt;Language Variants - Native support for 1:1-translations in the core&lt;/li&gt;
&lt;li&gt;Removed all dynamics, UmbracoTemplatePage etc&lt;/li&gt;
&lt;li&gt;Introduced "NuCache", no more XML (umbraco.config)&lt;/li&gt;
&lt;li&gt;Introduced Composition and Components for startup and Dependency Injection&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/800"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.1&lt;/h2&gt;
&lt;p&gt;Released: 2019-07-09&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improved editor experiance&lt;/li&gt;
&lt;li&gt;Nested Content - Copy &amp;amp; Paste&lt;/li&gt;
&lt;li&gt;Easier access to MiniProfiler by a Settings-dashboard switch.&lt;/li&gt;
&lt;li&gt;Ignore User Start Nodes&lt;/li&gt;
&lt;li&gt;Accessibility improvements&lt;/li&gt;
&lt;li&gt;Models Builder updates&lt;/li&gt;
&lt;li&gt;Introduces IPublishedPropertyType, breaking change for PropertyValueConverters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/810"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;​&lt;/p&gt;
&lt;h2&gt;Umbraco 8.2&lt;/h2&gt;
&lt;p&gt;Released: 2019-10-15&lt;/p&gt;
&lt;p&gt;A total of 91 features and fixes in this release.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rich Text Editor enhancements
&lt;ul&gt;
&lt;li&gt;Performance / loading time improved&lt;/li&gt;
&lt;li&gt;Drag and drop images&lt;/li&gt;
&lt;li&gt;Copy/paste from Word improved&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Improved cache performance and stability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/820"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;​&lt;/p&gt;
&lt;h2&gt;Umbraco 8.3&lt;/h2&gt;
&lt;p&gt;Released: 2019-11-12&lt;/p&gt;
&lt;p&gt;A small minor release with a major feature added.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Allowing to change the culture of a language (ie. dialects English UK to English US) &lt;/li&gt;
&lt;li&gt;Disable renaming for built in User Groups&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/830"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.4&lt;/h2&gt;
&lt;p&gt;Released: 2019-12-10&lt;/p&gt;
&lt;p&gt;A maintenance-release with dataType-tracking added, improved backoffice search and around 180 community contributions.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fixes issue with outdates results from Content Service&lt;/li&gt;
&lt;li&gt;Fixes redirects for moved content nodes&lt;/li&gt;
&lt;li&gt;Allow to search by Content Guid&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/840"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.5&lt;/h2&gt;
&lt;p&gt;Released: 2020-01-14&lt;/p&gt;
&lt;p&gt;The "Models Builder" in Core-release, note that there was some fast bug fix-releases after this was release.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added a slime down version of Models Builder in the the Umbraco Core, used to be an external package.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/850"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.6&lt;/h2&gt;
&lt;p&gt;Released: 2020-03-31&lt;/p&gt;
&lt;p&gt;Contains a lot of accessibility fixes and also bug and stability fixes and also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Custom validation messages for Content Types&lt;/li&gt;
&lt;li&gt;Media Tracking (shows where media is used)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/860"&gt;Release details on our&lt;/a&gt;&lt;br /&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-product-update-february-20th-2020/" target="_blank"&gt;Umbraco HQ-blog about the release&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.7&lt;/h2&gt;
&lt;p&gt;Released: 2020-09-10&lt;/p&gt;
&lt;p&gt;The "Block List Editor"-release contains ie:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The new Block List Editor property editor&lt;/li&gt;
&lt;li&gt;Segments-support at API-level&lt;/li&gt;
&lt;li&gt;Content Apps for Document Types&lt;/li&gt;
&lt;li&gt;Complex validation in property editors&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/870"&gt;Release details on our&lt;/a&gt;&lt;br /&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-product-update-february-20th-2020/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-87-release/" target="_blank"&gt;Umbraco HQ-blog about the release&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.8&lt;/h2&gt;
&lt;p&gt;Released: 2020-10-01&lt;/p&gt;
&lt;p&gt;Mainly the "Image Cropper in Grid" and "List view for media"-release. Includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cropping-improvements to image control in the grid&lt;/li&gt;
&lt;li&gt;List view's for media&lt;/li&gt;
&lt;li&gt;Improved support for Guid and Udi-references to content/media&lt;/li&gt;
&lt;li&gt;Icons as SVG&lt;/li&gt;
&lt;li&gt;JSON-editor for gris style/settings-configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/880"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-88-release/" target="_blank"&gt;Umbraco HQ-blog about the release&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.9&lt;/h2&gt;
&lt;p&gt;Released: 2020-10-26&lt;/p&gt;
&lt;p&gt;The "OAuth"-release that expands extensibility points for 3rd party login providers ie. Open Id Connect.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extensibility-points to login using Open Id Connect ie. Facebook or Azure Active Directory&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/890"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-89-release/" target="_blank"&gt;Umbraco HQ-blog about the release&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.10&lt;/h2&gt;
&lt;p&gt;Released: 2020-12-28&lt;/p&gt;
&lt;p&gt;A "maintenance"-release that includes many contributions from the "Hacktoberfest 2020".&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updates to Block List Editor&lt;/li&gt;
&lt;li&gt;Popups when entering preview mode in new browser tab&lt;/li&gt;
&lt;li&gt;Property editor "full width" editor&lt;/li&gt;
&lt;li&gt;Checkbox-list-editor for grid settings&lt;/li&gt;
&lt;li&gt;Faster content query and reduced memory consumption&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/8100"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-810-release/" target="_blank"&gt;Umbraco HQ-blog about the release&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Umbraco 8.11&lt;/h2&gt;
&lt;p&gt;Released: 2021-01-28&lt;/p&gt;
&lt;p&gt;A "maintenance"-release UX and accessibility&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unattended installs&lt;/li&gt;
&lt;li&gt;"Remove all"-option for Multi Node Tree Picker&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://our.umbraco.com/download/releases/8110"&gt;Release details on our&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://umbraco.com/blog/umbraco-811-release/" target="_blank"&gt;Umbraco HQ-blog about the release&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 31 Oct 2019 07:33:37 Z</pubDate>
      <a10:updated>2019-10-31T07:33:37Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">b251d298-01a8-4a62-930e-6890c8d1bd4d</guid>
      <link>https://www.enkelmedia.se/blogg/2019/10/22/t-sql-compare-sql-server-vs-sql-ce-compact-edition?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>T-SQL compare SQL Server vs SQL CE (Compact Edition)</title>
      <description>&lt;p&gt;This blog post came out of my work with packages for Umbraco CMS, but it's totally applicable even if you're not working with Umbraco. When building packages for Umbraco that works with custom tables you have to keep in mind that CMS supports different databases. We need to make sure that our queries works on both the standard SQL Server and with SQLCE.&lt;/p&gt;
&lt;p&gt;I've decided to try to create a list of queries and map out what does and what doesn't work depending on the database type.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;table border="0" style="height: 1254px;"&gt;
&lt;tbody&gt;
&lt;tr style="height: 43px;"&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;&lt;strong&gt;Query-example&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;&lt;strong&gt;SQL Serv.&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;&lt;strong&gt;SQLCE&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 43px;"&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;Regular SELECT&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;SELECT * FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT with Subquery in select-statement&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT id&lt;br /&gt;(SELECT COUNT(pk) from cmsDataType) as Test&lt;br /&gt;FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT with Subquery in WHERE-statement&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT id, [text]&lt;br /&gt;FROM umbracoNode&lt;br /&gt;WHERE Id IN (SELECT nodeId from cmsDataType)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT with Subquery (scalar&lt;sup&gt;1&lt;/sup&gt;) in WHERE&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT id, [text]&lt;br /&gt;FROM umbracoNode&lt;br /&gt;WHERE Id = (SELECT TOP 1 nodeId from cmsDataType)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 85px;"&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT with Inner Join&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;SELECT n.id, n.[text]&lt;br /&gt;FROM umbracoNode n&lt;br /&gt;INNER JOIN cmsDataType d ON d.nodeId = n.id&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 85px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT with STUFF-function&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT id,[text], STUFF([text],1,1, '')&lt;br /&gt;FROM umbracoNode&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;SELECT TOP &lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;SELECT TOP 5 * FROM cmsContentType&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 106px;"&gt;
&lt;td style="height: 106px;"&gt;
&lt;p&gt;SELECT with “FOR XML PATH”. &lt;br /&gt;Will format as a scalar XML-payload&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px;"&gt;
&lt;p&gt;SELECT TOP 10 id,[text]&lt;br /&gt;FROM umbracoNode&lt;br /&gt;ORDER By [text]&lt;br /&gt;FOR XML Path('node')&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px;"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 106px;"&gt;
&lt;td style="height: 106px;"&gt;
&lt;p&gt;Row_Number() / Paging with &lt;br /&gt;SELECT with ROW_NUMBER()&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px;"&gt;
&lt;p&gt;SELECT id,[text],&lt;br /&gt;ROW_NUMBER() OVER (ORDER BY [text]) AS RowNumber&lt;br /&gt;FROM umbracoNode&lt;br /&gt;ORDER By [text]&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 106px;"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 127px;"&gt;
&lt;td style="height: 127px;"&gt;
&lt;p&gt;Paging with &lt;br /&gt;SELECT WITH OFFSET AND FETCH &lt;sup&gt;2&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 127px;"&gt;
&lt;p&gt;SELECT id,[text]&lt;br /&gt;FROM umbracoNode&lt;br /&gt;ORDER BY id&lt;br /&gt;OFFSET 0 ROWS&lt;br /&gt;FETCH NEXT 10 ROWS ONLY&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 127px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 127px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 43px;"&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;SELECT DISTINCT-feature&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;SELECT DISTINCT ContentId from cmsContentVersion ORDER BY ContentId&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 43px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 32px;"&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;SELECT COUNT with DISTINCT&lt;sup&gt;3&lt;/sup&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;&lt;span&gt;SELECT&lt;/span&gt; &lt;span&gt;COUNT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DISTINCT&lt;/span&gt; thumbnail&lt;span&gt;)&lt;/span&gt; &lt;span&gt;FROM&lt;/span&gt; cmsContentType&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT with LIKE in Where&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT * &lt;br /&gt;FROM umbracoNode WHERE [text] LIKE '%st%'&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT with Subquery in FROM-statement.&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT count(contentId) &lt;br /&gt;FROM (SELECT DISTINCT contentId FROM cmsContentVersion) cmsContentVersion&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 64px;"&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT with LEFT OUTER JOIN&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;SELECT n.id, n.[text], d.dbType, d.pk FROM umbracoNode as n&lt;br /&gt;LEFT OUTER JOIN cmsDataType as d ON n.id = d.nodeId&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 64px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 32px;"&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;Parameter Alias declared as string&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;SELECT id as 'foo' FROM bar&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;x&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 32px;"&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;Parameter Alias declared inline&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;SELECT id as foo FROM bar&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 32px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 94px;"&gt;
&lt;td style="height: 94px;"&gt;
&lt;p&gt;SELECT with INNER JOIN Subquery in FROM&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 94px;"&gt;
&lt;p&gt;SELECT * FROM cmsTemplate as t&lt;br /&gt;INNER JOIN (SELECT templateId, count(id) as total &lt;br /&gt;FROM umbracoDocumentVersion WHERE published = 1 &lt;br /&gt;GROUP by templateId) as dv ON dv.templateId = t.nodeId&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 94px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td style="height: 94px;"&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;CROSS APPLY&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;SELECT id,userName,ugr.Roles FROM umbracoUser u&lt;br /&gt;CROSS APPLY (SELECT COUNT(ug.userId) as Roles FROM umbracoUser2UserGroup AS ug WHERE ug.userId = u.id) as ugr&lt;br /&gt;ORDER BY ugr.Roles DESC&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;X&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;1. A scalar query is a query that returns one row consisting of one column.&lt;br /&gt;2. Works on SQL Server 2012+, older versions need the ROW_NUMBER()&lt;br /&gt;3. Another version of the query with a join in the FROM-caluse works on SQL CE: SELECT COUNT(thumbs.total) as Total FROM (SELECT DISTINCT thumbnail as total FROM cmsContentType) as thumbs&lt;/p&gt;
&lt;p&gt;I hope that this little table is useful and please, feel free to drop a comment if you have any feedback or suggestions on things I've missed.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Tue, 22 Oct 2019 07:08:32 Z</pubDate>
      <a10:updated>2019-10-22T07:08:32Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2e9dca2b-0c21-496a-aa1e-41d3ac6d1f4f</guid>
      <link>https://www.enkelmedia.se/blogg/2018/11/16/umbraco-sweden-festival-2018?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco Sweden Festival 2018</title>
      <description>&lt;p&gt;The yearly Umbraco festival in Sweden was hosted today in Gothenburg and I was one of the speakers. My subject was “The first Umbraco V8-site” and I tried to share some of my learnings from trying to implement a new site with the current “version” of Umbraco v8.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/27996/presentation usf2018_599x337.jpg" alt="Presentation Usf 2018" width="599" height="337" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You can &lt;a href="https://www.enkelmedia.se/media/27993/The%20first%20Umbraco%20v8%20site%20-%20Umbraco%20Sweden%20Festival%202018.pdf"&gt;download the slides here&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 16 Nov 2018 10:47:00 Z</pubDate>
      <a10:updated>2018-11-16T10:47:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">0272cd65-b6a8-4cd7-90cf-b9cc6171cdac</guid>
      <link>https://www.enkelmedia.se/blogg/2018/11/5/how-to-fix-when-resharper-says-cannot-resolve-partial-view?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>How to fix when ReSharper says "Cannot resolve partial view"</title>
      <description>&lt;p&gt;This is a quite annoying problem that I sometimes hit with Resharper, some of the times the views are in the “correct” folders and sometimes when we’re using custom locations for the views.&lt;/p&gt;
&lt;p&gt;Fortunately it can be fixed.&lt;/p&gt;
&lt;h4&gt;Use annotations to indicate where views are placed&lt;/h4&gt;
&lt;p&gt;Jetbrains ships a package of annotations that we can use to tell Resharper where our views are placed. Start by referencing the Nuget-package that contains these annotations:&lt;/p&gt;
&lt;p&gt;&lt;span class="nuget-command"&gt;Install-Package JetBrains.Annotations&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then in your solution, open the “Properties/AssemblyInfo.cs”-file and add these annotations to indicate for Resharper where you views are placed.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;[assembly: AspMvcPartialViewLocationFormat(@&amp;quot;~\Views\Partials\{0}.cshtml&amp;quot;)]
[assembly: AspMvcPartialViewLocationFormat(@&amp;quot;~\Views\MacroPartials\{0}.cshtml&amp;quot;)]
[assembly: AspMvcViewLocationFormat(@&amp;quot;~\Views\{1}.cshtml&amp;quot;)]&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;The example above works good with views in Umbraco CMS where some partials are placed in the "MacroPartials"-folder.&lt;br&gt;&lt;br&gt;There’s three different placeholders that you can use to build the paths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;{0} - view name&lt;/li&gt;
&lt;li&gt;{1} - controll name&lt;/li&gt;
&lt;li&gt;{2} - area name&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And there is also different annotations depending on what type of view we are looking for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AspMvcAreaMasterLocationFormatAttribute&lt;/li&gt;
&lt;li&gt;AspMvcAreaPartialViewLocationFormatAttribute&lt;/li&gt;
&lt;li&gt;AspMvcAreaViewLocationFormatAttribute&lt;/li&gt;
&lt;li&gt;AspMvcMasterLocationFormatAttribute&lt;/li&gt;
&lt;li&gt;AspMvcPartialViewLocationFormatAttribute&lt;/li&gt;
&lt;li&gt;AspMvcViewLocationFormatAttribute&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sometimes you beed to build and reload the projects for this to work.&lt;/p&gt;</description>
      <pubDate>Mon, 05 Nov 2018 14:23:00 Z</pubDate>
      <a10:updated>2018-11-05T14:23:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">f1d1bebc-7502-40d3-81d2-1bb22be15385</guid>
      <link>https://www.enkelmedia.se/blogg/2018/6/28/great-visual-studio-extensions?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Great Visual Studio extensions</title>
      <description>&lt;p&gt;In this post I just wanted to share some really good extensions for Visual Studio 2017 that I use on a daily basis.&lt;/p&gt;
&lt;h4&gt;File Nesting&lt;/h4&gt;
&lt;p&gt;A simple little utility that makes it possible to nest files from the UI, great for ie. web.config files with different versions for release, stage and production.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileNesting" data-anchor="?itemName=MadsKristensen.FileNesting"&gt;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileNesting&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/madskristensen/FileNesting"&gt;https://github.com/madskristensen/FileNesting&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/27776/blog-vs-ext-file-nesting.png" alt="Blog -vs -ext -file -nesting" width="600" height=""&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Configuration Transform&lt;/h4&gt;
&lt;p&gt;This cool utility can test your configuration transform before commiting them, great to test your transforms very fast.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=GolanAvraham.ConfigurationTransform"&gt;https://marketplace.visualstudio.com/items?itemName=GolanAvraham.ConfigurationTransform&lt;/a&gt;&lt;br&gt;&lt;a href="https://github.com/golavr/ConfigurationTransform"&gt;https://github.com/golavr/ConfigurationTransform&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/27791/blog-vs-ext-preview_diff.png" alt="Blog -vs -ext -preview _diff" width="600" height=""&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p style="text-decoration: line-through;"&gt;One issue with the current version of configuration transform (3.2) is that it only support configuration files thats placed in the root of project, i've created a pull request that solves this: &lt;a href="https://github.com/golavr/ConfigurationTransform/pull/6"&gt;https://github.com/golavr/ConfigurationTransform/pull/6&lt;/a&gt;, so if you nned to work with config files outside of the root - just download and build the version with my fix and place the files in your VS-extentions folder:&lt;br&gt;&lt;br&gt;For Visual Studio 2017 the path is:&lt;br&gt;%LocalAppData%\Microsoft\VisualStudio\{vs-version}\Extensions\&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Markdown Editor&lt;/h4&gt;
&lt;p&gt;Provides a markdown editor inside Visual Studio, great when you want to edit your Github readme.md-files.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor" target="_blank"&gt;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/27836/vs-markdown-preview-window.png" alt="Vs -markdown -preview -window" width="600" height=""&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;SQLite/SQL Server Compact Toolbox&lt;/h4&gt;
&lt;p&gt;This extension brings a lot of nice features and the one that I use the most is the ability to connect to a SQL Server Compact (SQLCE) or a .sdf database.&lt;/p&gt;
&lt;p&gt;When I work with Umbraco CMS it's very nice to have this extention installed. I usally run Umbraco with SQL Server Express but the default option in the installer is SQLCE. So this extension to Visual Studio is very handing when building packages for Umbraco and to test out something.&lt;/p&gt;
&lt;p&gt;Using this extension we can connect to, query and modify a SQLCE database inside of Visual Studio, after install we'll find a window under "View -&amp;gt; Windows" where we'll find all the goodness.&lt;/p&gt;
&lt;p&gt;Download it here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ErikEJ.SQLServerCompactSQLiteToolbox"&gt;https://marketplace.visualstudio.com/items?itemName=ErikEJ.SQLServerCompactSQLiteToolbox&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;img style="width: 500px; height: 324.8847926267281px;" src="https://www.enkelmedia.se/media/27997/sqlce-toolbox2.png?width=500&amp;amp;height=324.8847926267281" alt=""&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Mapping Generator&lt;/h4&gt;
&lt;p&gt;Nice little utility that can create automatic mappings for DTOs and Domain Models or View Models, I often use it to generate a starting point and then manually change the details for properties that need it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img style="width: 0px; height: 0px;" src="https://www.enkelmedia.se/media/27998/mapping_method_newone.gif" alt=""&gt;&lt;img style="width: 500px; height: 335.820895522388px;" src="https://www.enkelmedia.se/media/27998/mapping_method_newone.gif?width=500&amp;amp;height=335.820895522388" alt=""&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Download it here: &lt;a href="https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.mappinggenerator"&gt;https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.mappinggenerator&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 28 Jun 2018 12:15:00 Z</pubDate>
      <a10:updated>2018-06-28T12:15:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">59c91b7a-8485-4b75-9bbc-bfe57318981e</guid>
      <link>https://www.enkelmedia.se/blogg/2016/10/13/why-umbraco-training-matters?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Why Umbraco training matters</title>
      <description>&lt;p&gt;I’m not sure if everyone who reads my blog knows that I’m the trainer for the official Swedish Umbraco courses. It was after CodeGarden 2013 that I was asked to help out with the education of developers and designers here in Sweden and I’ve had a lot of fun and made a lot of new friends during these events! &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/24788/Windows-Live-Writer_Why-Umbraco-training-matters_BED5_IMG_4170.jpg"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" src="https://www.enkelmedia.se/media/24793/Windows-Live-Writer_Why-Umbraco-training-matters_BED5_IMG_4170_thumb.jpg" border="0" alt="IMG_4170" width="670" height="389" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Over the years I’ve had a lot of really smart people attending my courses – but I’ve never had any student regretting that they attended. It does not matter which skill-level you have before you come – there is always something new to learn and to try. A lot of people think of different courses as a way to get certified  and yes – that’s really good and very important. At the same time I really want to point out the greatest value about the courses, that’s all the knowledge  that you can take home and use in all new projects.&lt;/p&gt;
&lt;p&gt;When I attended the trainings I’ve been working with Umbraco for about 4 years and still I decided to go to the Fundamentals training just to make sure that I haven’t missed anything important. It was some repetition but I got away after these to days with about 10 things did I did not know before – big features in the core that I’ve never used or small tips and tricks that made some tasks trivial compared to how I’ve solved them before.&lt;/p&gt;
&lt;p&gt;This week the Norwegian developer &lt;a rel="noopener" href="https://github.com/lars-erik" target="_blank"&gt;Lars-Erik Aabech&lt;/a&gt; pointed out this with a nice tweet about something as simple as the “Alt Template”-feature of Umbraco.&lt;/p&gt;
&lt;blockquote class="twitter-tweet" data-lang="sv"&gt;
&lt;p dir="ltr"&gt;&lt;a href="https://twitter.com/bleedo"&gt;@bleedo&lt;/a&gt; &lt;a href="https://twitter.com/markusjoha"&gt;@markusjoha&lt;/a&gt; I was also surprised at fundamentals training (!) after seeing this one. Didn't use it in the past at all :(&lt;/p&gt;
— Marcin Zajkowski (@zajkowskimarcin) &lt;a href="https://twitter.com/zajkowskimarcin/status/786165061962301440"&gt;12 oktober 2016&lt;/a&gt;&lt;/blockquote&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;A lot of experienced Umbraco developers that have not attended the trainings have probably missed out on this and on stuff like “Recursive properties”. These to thing are just small examples of stuff from the Fundamentals-training that self-thought developers never get to know.&lt;/p&gt;
&lt;h3&gt;So why does the trainings matters?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fastest way to get a compact “smorgasbord” of up-to-date knowledge about Umbraco&lt;/li&gt;
&lt;li&gt;Don’t miss any details or fundamentals&lt;/li&gt;
&lt;li&gt;Official certification –  comforting for clients&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your in Sweden and thinks about attending a course, have e look &lt;a href="#" title="Utbildning - Umbraco"&gt;here for the next training event&lt;/a&gt;!&lt;/p&gt;</description>
      <pubDate>Thu, 13 Oct 2016 12:11:00 Z</pubDate>
      <a10:updated>2016-10-13T12:11:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">46ca7a48-ef6b-4ad5-908c-af12069082d8</guid>
      <link>https://www.enkelmedia.se/blogg/2015/12/11/24-days-in-umbraco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>24 days in Umbraco</title>
      <description>&lt;p&gt;Today my blog post for 24 days in Umbraco was released. The topic is “&lt;a href="http://24days.in/umbraco/2015/the-code-that-changed-my-life/" target="_blank"&gt;The code that changes my life&lt;/a&gt;”.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/19828/24days.png" width="521" height="357" alt="24days"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This is a great Christmas tradition where the community posts one article per day up until Christmas! Head over to the site and read about some really interesting topics for example:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;&lt;a href="http://24days.in/umbraco/2015/umbraco-zeitgeist/" target="_blank"&gt;Effective Umbraco Development in 2016&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://24days.in/umbraco/2015/strongly-typed-vs-dynamic-content-access/" target="_blank"&gt;Strongly typed vs. Dynamic Content Access&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://24days.in/umbraco/2015/custom-listview/" target="_blank"&gt;Recreating the listview in a custom section&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://24days.in/umbraco/2015/umbraco-rest-api/" target="_blank"&gt;Umbraco REST API&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://24days.in/umbraco/2015/using-a-cdn-with-umbraco/" target="_blank"&gt;Using a CDN with Umbraco&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://24days.in/umbraco/2015/multilingual-vorto-nested-content/" target="_blank"&gt;1-1 Multilingual websites with Vorto and Nested Content&lt;/a&gt; &lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;You’ll find all the articles here: &lt;a href="http://24days.in/umbraco/2015/"&gt;http://24days.in/umbraco/2015/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Fri, 11 Dec 2015 08:35:00 Z</pubDate>
      <a10:updated>2015-12-11T08:35:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">9fd7c799-7316-4827-a813-10048420dd57</guid>
      <link>https://www.enkelmedia.se/blogg/2015/8/16/uhangout-about-the-dashboard?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>uHangout about "The Dashboard"</title>
      <description>&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/18978/Windows-Live-Writer_dbf81bde9796_BDC4_uhang-585_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/18983/Windows-Live-Writer_dbf81bde9796_BDC4_uhang-585_thumb.jpg" width="585" height="317" alt="uhang-585" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I finished of last week by participating in &lt;a href="https://twitter.com/warrenbuckley" target="_blank"&gt;Warren Buckley's&lt;/a&gt; lovely &lt;a href="http://uhangout.co.uk" target="_blank"&gt;uHangout&lt;/a&gt;. This time I showed my latest package “&lt;a href="https://our.umbraco.org/projects/backoffice-extensions/the-dashboard/" target="_blank"&gt;The Dashboard&lt;/a&gt;” which also won this years package competition on CodeGarden 15. The package is a really simple dashboard that can be used to give both editors and developers a better first experience when the log on to their Umbraco backoffice. This is how it looks:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/18988/Windows-Live-Writer_dbf81bde9796_BDC4_635698726453441911_thedasboardpng.png"&gt;&lt;img src="https://www.enkelmedia.se/media/18993/Windows-Live-Writer_dbf81bde9796_BDC4_635698726453441911_thedasboardpng_thumb.png" width="585" height="366" alt="635698726453441911_thedasboardpng" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Please &lt;a href="https://our.umbraco.org/projects/backoffice-extensions/the-dashboard/" target="_blank"&gt;Download The Dashboard&lt;/a&gt; and give it a spin! If you would like to contribute (or just leverage the source code) the project is hosted on GitHub: &lt;a href="https://github.com/enkelmedia/TheDashboard" title="https://github.com/enkelmedia/TheDashboard"&gt;https://github.com/enkelmedia/TheDashboard&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Our conversation also evolved into an overall discussion about the editor experience in Umbraco CMS and how you as a developer can improve it.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;If you want to watch the show it on &lt;a href="http://uhangout.co.uk/" title="http://uhangout.co.uk/"&gt;http://uhangout.co.uk/&lt;/a&gt; or on YouTube: &lt;a href="https://www.youtube.com/watch?v=fNoHxYSuBXo" title="https://www.youtube.com/watch?v=fNoHxYSuBXo"&gt;https://www.youtube.com/watch?v=fNoHxYSuBXo&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I’ll try to post a summery of the tips and tricks and the packages that I talk about in the upcoming days.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Cheers! =D&lt;/p&gt;</description>
      <pubDate>Sun, 16 Aug 2015 11:36:00 Z</pubDate>
      <a10:updated>2015-08-16T11:36:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">b059ffcc-65b8-4024-b75b-ae9e49b5493e</guid>
      <link>https://www.enkelmedia.se/blogg/2015/1/28/json-syntax-highlighting-for-umbraco-manifest-files?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Json syntax highlighting for Umbraco manifest files</title>
      <description>&lt;p&gt;Since Visual Studio 2013 update 2 VS includes a nice Json editor that makes is easier to edit files containing json data. By default this editor is only used for .json-files and since the json-formated package.manifest-file used to create new plugins for Umbraco has the manifest-extention Visual Studio won’t add any syntax highlighting.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This is easy to fix.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;1. Go to Tools / Options&lt;/p&gt;&#xD;
&lt;p&gt;2. I the left menu click on Text Editor and then File Extention.&lt;/p&gt;&#xD;
&lt;p&gt;3. Write “manifest” in the upper left text box, choose JSON Editor in the dropdown and click on Add.&lt;/p&gt;&#xD;
&lt;p&gt;4. Hi OK, open your manifest file and – ta da!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/18934/vs-manifest-extention.gif" alt="Vs -manifest -extention" style="width: 585px;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;PS. If you like the screen recorded GIF (I do) check out this awesome project: &lt;a href="https://screentogif.codeplex.com/" target="_blank"&gt;https://screentogif.codeplex.com/&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 28 Jan 2015 20:36:00 Z</pubDate>
      <a10:updated>2015-01-28T20:36:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">6be7df33-f5b5-48ad-b754-31d102ed4e8d</guid>
      <link>https://www.enkelmedia.se/blogg/2014/12/7/speaking-at-swetugg?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Speaking at Swetugg</title>
      <description>&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.swetugg.se/" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/18874/Windows-Live-Writer_f3358604bbfa_C91F_swetugg_1.jpg" width="584" height="330" alt="swetugg" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;February 2-3 next year the Swedish .NET User Group (SWENUG) will host a two day .NET-conference in Stockholm, Sweden.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Topics varies around the .NET-space and  I’ve got the honor to speak about Umbraco CMS. I’m planning to do a very short basic intro about Umbraco and then dive into how to extend the editor environment using AngularJS. My experience from showing Umbraco to new users is that the Angular-based property editors really impresses people. My hope is that this session will help to further grow the Umbraco community here in Sweden.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;If you would like to join, tickets only costs 500 SEK, read more at &lt;a href="http://www.swetugg.se/" target="_blank"&gt;swetugg.se&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.swetugg.se/Speakers/Details/22" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/18879/Windows-Live-Writer_f3358604bbfa_C91F_swetugg-speaker_1.jpg" width="584" height="369" alt="swetugg-speaker" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 07 Dec 2014 12:00:00 Z</pubDate>
      <a10:updated>2014-12-07T12:00:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">f0e5bb27-58ce-4e20-9946-1cf20f7ad163</guid>
      <link>https://www.enkelmedia.se/blogg/2014/8/1/great-tip-for-url-replacing-with-umbraco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Great tip for url replacing with Umbraco</title>
      <description>&lt;p&gt;As long as I can remember Umbraco has shipped with a set of presets for the url replacing feature. This is the feature that takes the node name and turns it into a valid url. These presets lives in the /config/umbracoSettings.config-file and used to look something like this.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;urlReplacing removeDoubleDashes=&amp;quot;true&amp;quot;&amp;gt;
   &amp;lt;char org=&amp;quot; &amp;quot;&amp;gt;-&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;&amp;quot;&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;.&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;;&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;/&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;:&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;+&amp;quot;&amp;gt;plus&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;*&amp;quot;&amp;gt;star&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;&amp;amp;&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;?&amp;quot;&amp;gt;&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;æ&amp;quot;&amp;gt;ae&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;ø&amp;quot;&amp;gt;oe&amp;lt;/char&amp;gt;
   &amp;lt;char org=&amp;quot;å&amp;quot;&amp;gt;aa&amp;lt;/char&amp;gt;
&amp;lt;/urlReplacing&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;In later versions of Umbraco (I think since Umbraco 7) the urlReplacing element has been removed from the default umbracoSettings.config-file and the presets are hidden. At CodeGarden14 this year I learned very much from &lt;a rel="noopener" href="https://twitter.com/zpqrtbnk" target="_blank"&gt;Stephans&lt;/a&gt; session about the core internals of Umbraco (Slides: &lt;a href="http://www.zpqrtbnk.net/CoreInternalsForWebsiteDevelopment.pdf"&gt;http://www.zpqrtbnk.net/CoreInternalsForWebsiteDevelopment.pdf&lt;/a&gt;) one thing was the toAscii-property of the urlReplacing-element. Since there is hundreds of different chars that you might want to replace and it’s very likely that you’ll miss some – that why they have included this great little flag. So all the configuration above can be replaced with this simple line:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;&amp;lt;requestHandler&amp;gt;
  ....
    &amp;lt;urlReplacing toAscii=&amp;quot;true&amp;quot; /&amp;gt;
&amp;lt;/requestHandler&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;
</description>
      <pubDate>Fri, 01 Aug 2014 13:53:00 Z</pubDate>
      <a10:updated>2014-08-01T13:53:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2733021f-4adb-4de1-ae5e-d789040239d4</guid>
      <link>https://www.enkelmedia.se/blogg/2014/5/8/currentumbracopage-or-redirecttocurrentumbracopage?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>CurrentUmbracoPage or RedirectToCurrentUmbracoPage?</title>
      <description>&lt;p&gt;I had that question in mind when I was working with a new MVC-site using Umbraco 7 and wanted to share my conclusions. Well after some googling I found this great &lt;a rel="noopener" href="http://shazwazza.com/post/Umbraco-v5-Surface-Controller-Forms" target="_blank"&gt;blogpost&lt;/a&gt; from the Umbraco core-developer &lt;a rel="noopener" href="http://shazwazza.com/" target="_blank"&gt;Shannon Deminick&lt;/a&gt;. It’s related to Umbraco 5 (RIP) but the concept still applies to the MVC-implementation in Umbraco 7 (and 6), in one of the comments he explains the difference.&lt;/p&gt;
&lt;p&gt;So. This is the thing.&lt;/p&gt;
&lt;h4&gt;Use return CurrentUmbracoPage()&lt;/h4&gt;
&lt;p&gt;When you just want to return the current page. Here you can use the ViewData and ViewBag objects to pass data from the controller to the view and that will work just fine. Generally, you want to return to the current page if you want to keep the POST-data that was sent to the controller.&lt;/p&gt;
&lt;h4&gt;Use return RedirectToCurrentUmbracoPage()&lt;/h4&gt;
&lt;p&gt;When you really want to redirect the user. Shannon writes: “&lt;em&gt;If your POST is successful, you shouldn't just return a response, you should redirect to a page so you can avoid the awful issue of having a user press refresh and have it resubmit the POST&lt;/em&gt;”. To pass data back to the view you’ll need to use the TempData-object that will “survive” the redirect.&lt;/p&gt;
&lt;p&gt;So if you’re creating a form and the model state IS valid, you should perform your actions and RedirectToCurrentUmbracoPage(), if the model is not valid you should just return the CurrentUmbracoPage(). That’s why many examples look like this:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;if(!ModelState.IsValid)
   return CurrentUmbracoPage()
// do stuff here
return RedirectToCurrentUmbracoPage()&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;Another thing to notice about the routing is “&lt;em&gt;Just FYI when you POST to a SurfaceController, you are just posting to your own controller which is outside of the Umbraco process, it is just a very normal MVC post. So when you do a return CurrentUmbracoPage call, that then passes execution back to Umbraco to go look up the page that was posted from and renders it. You could in theory just return your own View(model) which will be completely outside the Umbraco process, because it is just an MVC normal controller.&lt;/em&gt;”&lt;/p&gt;
&lt;p&gt;Thanks, Shannon for making this clear! #h5yr&lt;/p&gt;</description>
      <pubDate>Wed, 07 May 2014 23:08:00 Z</pubDate>
      <a10:updated>2014-05-07T23:08:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">60860f41-19f4-416c-b4ac-51c6e5f7bb3e</guid>
      <link>https://www.enkelmedia.se/blogg/2014/5/3/stored-procedures-with-output-parameters-using-petapoco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Stored Procedures with output parameters using PetaPoco</title>
      <description>&lt;p&gt;I’m working on a web application where I’m using the great mirco orm &lt;a rel="noopener" href="http://www.toptensoftware.com/petapoco/" target="_blank"&gt;PetaPoco&lt;/a&gt; for my data access. Is a really great and super fast ORM that works with SQL Server, SQLCE. MySQL and more.&lt;/p&gt;
&lt;p&gt;I’m not gonna cover the basics of PetaPoco in this blog post so if you have not worked with it please read the &lt;a rel="noopener" href="http://www.toptensoftware.com/petapoco/" target="_blank"&gt;introduction&lt;/a&gt; from TopTen Software.&lt;/p&gt;
&lt;p&gt;Now. In this solution we where working with stored procedures (SP) in the SQL Server which is quite simple with PetaPoco, to execute a SP called OutputDemo with two parameters, just write&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var sql = Sql.Builder.Append(&amp;quot;;EXEC OutputDemo @0, @1, &amp;quot;Markus&amp;quot;,29);&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;​So that's easy. But what if we need to grab some &lt;a rel="noopener" href="http://technet.microsoft.com/en-us/library/ms378108.aspx" target="_blank"&gt;output parameters&lt;/a&gt;from the sp as well? That took me some more work to figure out. I googled a lot on the subject and there was not really any good recourse so i figured i had to share my solution.&lt;/p&gt;
&lt;p&gt;First, let’s look look at the stored procedure that I’ve created for this demo&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;CREATE PROCEDURE [dbo].[OutputDemo]
    @name varchar(50),
    @age int,
    @resName varchar(50) OUTPUT,
    @resAge int OUTPUT
AS
SET @resAge= @age + 10
SET    @resName = &amp;#x27;Name: &amp;#x27; + @name&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;A super simple sp that will set the values of the output parameters depending in the value in the input parameters for name and age. So the resAge-output parameter will have the value of the inputted age plus 10, and the resName-output parameter will just be prefixed with “Name:”.&lt;/p&gt;
&lt;p&gt;Now. To use this and to get the values back from the query there is couple of thing we need to do. First we need to create variables that holds the returning values from the output parameters.&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var opName = new SqlParameter(&amp;quot;@resName&amp;quot;, SqlDbType.VarChar);
opName .Direction = ParameterDirection.Output;
opName .Size = 50;

var opAge= new SqlParameter(&amp;quot;@resAge&amp;quot;, SqlDbType.Int);
opAge.Direction = ParameterDirection.Output;
opAge.Size = 20;&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;This is regular SqlParameters – I’ve just ignored the fact that this would “tie” me to SQL Server since my SP’s are created in SQL Server is just don’t care about this dependency. The important thing to notice is the Direction and the Size-properties that both are mandatory. Next wee need to create the query:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var s = Sql.Builder.Append(&amp;quot;;EXEC OutputDemo @0, @1, @2 OUTPUT, @3 OUTPUT&amp;quot;,
           &amp;quot;Markus&amp;quot;,
           29, 
           opName ,
           opAge
          );&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt;As you see here I’m adding the word “OUTPUT” after each variable for the output parameters – this tells the ADO.NET and PetaPoco that these variables should be populated with the return values of the output parameters.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;So with this code executed the value of opName should be “Name: Markus” and opAge should be 39. Here’s the complete code:&lt;/p&gt;
&lt;div&gt;&#xD;
&lt;pre class="language-csharp"&gt;&lt;code&gt;var opName = new SqlParameter(&amp;quot;@resName&amp;quot;, SqlDbType.VarChar);
opName .Direction = ParameterDirection.Output;
opName .Size = 50;
var opAge= new SqlParameter(&amp;quot;@resAge&amp;quot;, SqlDbType.Int);
opAge.Direction = ParameterDirection.Output;
opAge.Size = 20;
var s = Sql.Builder.Append(&amp;quot;;EXEC OutputDemo @0, @1, @2 OUTPUT, @3 OUTPUT&amp;quot;,
  &amp;quot;Markus&amp;quot;,
  29, 
  opName ,
  opAge
 );
new Database().Execute(s);&lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;br&gt;     &lt;/p&gt;</description>
      <pubDate>Sat, 03 May 2014 13:36:00 Z</pubDate>
      <a10:updated>2014-05-03T13:36:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">141818d0-f58a-474a-88dd-0699d5d32fa6</guid>
      <link>https://www.enkelmedia.se/blogg/2014/5/3/the-world-s-greatest-azure-demo?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>The world's greatest Azure demo</title>
      <description>&lt;p&gt;&lt;span&gt;Yesterday &lt;/span&gt;I was listening to my favorite podcast &lt;a rel="noopener" href="http://www.dotnetrocks.com/" target="_blank"&gt;.NET-ROCKS&lt;/a&gt; and heard about &lt;a rel="noopener" href="http://www.troyhunt.com/" target="_blank"&gt;Troy Hunts&lt;/a&gt; great Azure demo - not not just a great demo - it's The world's greatest Azure demo, just wanted to share it here as well:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/7V8HikBP1vQ" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 03 May 2014 11:47:00 Z</pubDate>
      <a10:updated>2014-05-03T11:47:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">d13044fd-f710-46d2-afe3-15af19577ccc</guid>
      <link>https://www.enkelmedia.se/blogg/2014/4/27/umbraco-7-image-cropper?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco 7 Image Cropper</title>
      <description>&lt;p&gt;Since &lt;a href="http://our.umbraco.org/contribute/releases/710/" target="_blank"&gt;version 7.1&lt;/a&gt; of Umbraco was released the core now contains a great image cropper. Not only that. It also contains a great image processing library called &lt;a href="https://github.com/JimBobSquarePants/ImageProcessor" target="_blank"&gt;ImageProcessor&lt;/a&gt; written by James South (&lt;a href="https://twitter.com/James_M_South" target="_blank"&gt;@james_m_south&lt;/a&gt;).&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The &lt;strong&gt;image cropper in Umbraco 7&lt;/strong&gt; is really a piece of art based on the &lt;a href="http://our.umbraco.org/projects/website-utilities/eksponent-cropup" target="_blank"&gt;CropUp&lt;/a&gt;-package from Umbraco-genius Niels Kühnel (&lt;a href="https://twitter.com/nielskuhnel" target="_blank"&gt;@nielskuhnel&lt;/a&gt;). The big “news” with the cropper is something called a “focal point” that the editor can set. When this point is in place Umbraco is smart enough to figure out any crop based on this point. This means that you don’t have to force the editor to make 20 different crops, they can just set the focus point and the different crops will be generated. We’re going to explore this more in this post and I'll show you how to quickly set up the image cropper and render the cropped image on the front end of your website.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.newsletterstudio.org/features/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=image%20cropper&amp;amp;utm_campaign=blogg" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/17232/newsletterstudio-banner-580x250.png" alt="Newsletter Studio -banner -580x 250"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;h4&gt;Here is how you do&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;1. Set up the data type in the developer-section of Umbraco 7. Right click data types and create a new data type. Let's call it "Image Cropper".&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;2. Just as with the cropper from earlier versions of &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; we now need to set up one or more crops. Let's just use a simple crop of 120x120 px.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16946/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-datatype_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/16951/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-datatype_thumb.png" width="574" height="283" alt="imagecropper-datatype" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;3. Next, we need to add this data type to one of our document types. Let’s go and do so in the settings-section. I’m giving my new property the name “image” but you can choose what ever name that suites you’re solution.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16956/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-doctype_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/16961/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-doctype_thumb.png" width="574" height="503" alt="imagecropper-doctype" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;4. Now let’s upload an image and set the focus point by dragging the blue dot to the part of the image that we want to focus on. Let’s don’t create any special settings for the 120x120 crop that we created – just hit “Save and publish”.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16966/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-image_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/16971/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-image_thumb.png" width="398" height="502" alt="imagecropper-image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;5. Let’s go to the settings-section and open the view/template for the document type that we’ve added the image cropper to. To render the crop in on the page we need to use a method called GetCropUrl() from the IPublishedContent-type in Umbraco. Let’s add this code the view and load the page in the browser.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;&amp;lt;img src="@Model.Content.GetCropUrl("image", "normal")" /&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The first parameter is the alias of the property and the second is the name of the crop, this should look something like this.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16976/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-croppedimage_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/16981/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-croppedimage_thumb.png" width="353" height="298" alt="imagecropper-croppedimage" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;6. As you can see Umbraco 7 created a crop based on the focus point that we provided. To prove that this really works, let’s ignore the “normal” crop and set the width and height in the method call.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;&amp;lt;img src="@Model.Content.GetCropUrl(propertyAlias:"image", width:300, height:100)" /&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This will generate an image that’s 300x100 pixels, still with the face in focus&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16986/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-croppedimage2_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/16991/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-croppedimage2_thumb.png" width="482" height="143" alt="imagecropper-croppedimage2" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;7. Now, let’s try to move the focal point and look at the resulting crop&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16996/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-movedpoint_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/17001/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-movedpoint_thumb.png" width="574" height="304" alt="imagecropper-movedpoint" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;8. But, if we don’t like the default crops that Umbraco generates we can of course change them to look exactly like we want. Update the view-code to use the “normal” crop again and open the node with the crop back to the content-section. Click on the little thumbnail under the big picture, in the dialog that appears. Drag the slider to zoom and drag in the picture to adjust the part that you want to keep in the crop – click the “cross” in the upper right corner to save the custom crop &lt;span&gt;before&lt;/span&gt;you click save and publish.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/17006/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-customcrop_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/17011/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecropper-customcrop_thumb.png" width="544" height="309" alt="imagecropper-customcrop" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;9. Going back to our view and refreshing the page will show our new crop&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/17016/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecrop-customcropfrontend_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/17021/WindowsLiveWriter_Umbraco7ImageCropper_13BDD_imagecrop-customcropfrontend_thumb.png" width="453" height="222" alt="imagecrop-customcropfrontend" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The GetCropUrl()-method has a lot of properties that’s optional like width, height, quality, useCropDimensions, cacheBusterValue, ratioMode, upScale – see the &lt;a href="https://github.com/umbraco/Umbraco-CMS/blob/95cd32ad8ce27993d9550a86950d821a1b4683ad/src/Umbraco.Web/ImageCropperTemplateExtensions.cs" target="_blank"&gt;source code&lt;/a&gt; of Umbraco 7 for more info on what they all means.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Hope you enjoy the new image cropper in Umbraco 7, follow this blog for most posts about Umbraco and please also follow me on twitter: &lt;a href="https://twitter.com/enkelmedia" target="_blank"&gt;@enkelmedia&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Tip: Looking for a integrated newsletter solution for Umbraco? Check out &lt;a href="http://www.newsletterstudio.org/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=imagecropper&amp;amp;utm_campaign=blogg" target="_blank"&gt;Newsletter Studio&lt;/a&gt; - sends newsletter from directly from the Umbraco backoffice.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;br /&gt;&lt;a href="http://www.newsletterstudio.org/features/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=image%20cropper&amp;amp;utm_campaign=blogg" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/17232/newsletterstudio-banner-580x250.png" alt="Newsletter Studio -banner -580x 250"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Sun, 27 Apr 2014 21:16:00 Z</pubDate>
      <a10:updated>2014-04-27T21:16:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">a4385ec7-11ba-42b4-a1ab-f1713481a8fd</guid>
      <link>https://www.enkelmedia.se/blogg/2014/1/13/new-dates-for-umbraco-training-in-sweden?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>New dates for Umbraco training in Sweden</title>
      <description>&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/16157/WindowsLiveWriter_NewdatesforUmbracotraininginSweden_5C55_IMG_3739.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/16162/WindowsLiveWriter_NewdatesforUmbracotraininginSweden_5C55_IMG_3739_thumb.jpg" border="0" alt="IMG_3739" width="570" height="309"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;It’s been a little more than a month since Umbraco 7 was released and it feels like a great timing that we announced new dates for Umbraco training in Stockholm, Sweden. Just like last time the course will be in Swedish but the course material (slides and workbook) is in English.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 13 Jan 2014 02:36:00 Z</pubDate>
      <a10:updated>2014-01-13T02:36:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1bafa7f4-32e3-429f-b68c-8f6982cf6b38</guid>
      <link>https://www.enkelmedia.se/blogg/2013/12/4/umbraco-use-the-rich-text-editor-tinymce-in-a-custom-section?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco: Use the rich text editor (TinyMCE) in a custom section</title>
      <description>&lt;p&gt;One requirement of Enkel Medias Umbraco-package &lt;a rel="noopener" href="http://www.newsletterstudio.org/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=rte&amp;amp;utm_campaign=blogg" target="_blank"&gt;Newsletter Studio&lt;/a&gt; is to render and use the built in rich text editor from Umbraco (&lt;a rel="noopener" href="http://www.tinymce.com/" target="_blank"&gt;TinyMCE&lt;/a&gt;) in the custom Newsletter Studio-section.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="http://www.newsletterstudio.org/features/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=tinymce&amp;amp;utm_campaign=blogg" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/17232/newsletterstudio-banner-580x250.png" alt="Newsletter Studio -banner -580x 250" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;TinyMCE in a custom Umbraco 7-section&lt;/h4&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15874/WindowsLiveWriter_Umbraco7UsetherichtexteditorTinyMCEinacu_11E9E_image_2.png"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15879/WindowsLiveWriter_Umbraco7UsetherichtexteditorTinyMCEinacu_11E9E_image_thumb.png" border="0" alt="image" width="594" height="400" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since the backoffice of &lt;a href="http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx" target="_parent"&gt;Umbraco 7&lt;/a&gt; is rebuilt using AngularJS all &lt;a rel="noopener" href="http://www.nibble.be/" target="_blank"&gt;property editors&lt;/a&gt; are built using JavaScript and they also rely on the current &lt;a rel="noopener" href="http://docs.angularjs.org/#!/api/ng.$rootScope.Scope" target="_blank"&gt;AngularJS-scope&lt;/a&gt; to contain some information on how to render the control. So in order to render our rich text editor (rte) we need to provide this information.&lt;/p&gt;
&lt;p&gt;There are some different ways to render the control, some are more “hacky” than others and I’m going to walk you through some options. Just to be clear –this is not a best practice guide for JavaScript so I’ve added the JavaScript controllers in script-elements inside the views. This is something that you should not do, they should live in their own .js-files – but for simplicity I ignore that in this blog post.&lt;/p&gt;
&lt;h4&gt;Option 1 –Copy the original view&lt;/h4&gt;
&lt;p&gt;The first option is to just copy the code from the original rte-view (from the Umbraco source code). It looks something like this:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;div ng-controller="Umbraco.PropertyEditors.RTEController" class="umb-editor umb-rte"&amp;gt;
    &amp;lt;textarea ng-model="model.value" rows="10" id="{{model.alias}}_rte"&amp;gt;&amp;lt;/textarea&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This is super simple. But it won’t work. Since &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; loads information about all the tabs, content, property types, values and so on for a content page when it’s loaded the RTEController assumes that the current scope has all this information. So we need to simulate that with our own controller. Let’s change the view so it looks like this:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;div ng-controller="CustomSectionEditController"&amp;gt;    
    &amp;lt;ng-form&amp;gt;
        &amp;lt;div ng-controller="Umbraco.PropertyEditors.RTEController" class="umb-editor umb-rte"&amp;gt;
            &amp;lt;textarea ng-model="model.value" rows="10" id="{{model.alias}}_rte"&amp;gt;&amp;lt;/textarea&amp;gt;
        &amp;lt;/div&amp;gt;            
        &amp;lt;pre&amp;gt;
            Value from the RTE {{model.value}}
        &amp;lt;/pre&amp;gt;
    &amp;lt;/ng-form&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;And for this code we need a controller called “CustomSectionEditController”, let’s just add a simple version of this controller:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;script type="text/javascript"&amp;gt;
    function CustomSectionEditController($scope) {

        $scope.model = {
            alias: 'myRichtexteditor',
            config: {
                editor: {
                    toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "table", "umbembeddialog"],
                    stylesheets: [],
                    dimensions: { height: 400, width: 250 }
                }

            }
        };
    }
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;With this code in place the rich text editor (rte) should be rendered and the HTML from the editor will be populated into the $scope.model.value-property.&lt;/p&gt;
&lt;p&gt;While this works it’s not so very flexible and another problem is that it will be hard to “lazy load” properties, values and settings since the rendering of the rte-controller could start before all your data has been downloaded.&lt;/p&gt;
&lt;h4&gt;Option 2 – Use the umb-editor directive&lt;/h4&gt;
&lt;p&gt;In the views in Umbraco all the property editors are loaded dynamically the view for editing content only uses this simple tag:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;umb-editor model="myProperty"&amp;gt;&amp;lt;/umb-editor&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Umb-editor is a Umbraco-specific AngularJS directive that will look at the model attribute to find out which $scope-property to use for getting rendering information, in this case it’s $scope.myProperty – so let’s add that:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;script type="text/javascript"&amp;gt;
    function CustomSectionEditController($scope) {
        $scope.myProperty= {
            label: 'bodyText',
            description: 'Load some stuff here',
            view: 'rte',
            config: {
                editor: {
                    toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "table", "umbembeddialog"],
                    stylesheets: [],
                    dimensions: { height: 400, width: 250 }
                }
            }
        };
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;As you can see with this code the $scope.myProperty.view property is called “rte” which tells AngularJS to load the rte (rich text editor)-view as the current view for this umb-editor. If we were to set $scope.myProperty.view to ‘textbox’, a textbox would be loaded. Updating the view to look like this would get this code to run:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;div ng-controller="CustomSectionEditController"&amp;gt;    
    &amp;lt;ng-form&amp;gt;
        &amp;lt;umb-editor model="myProperty"&amp;gt;&amp;lt;/umb-editor&amp;gt;      
        &amp;lt;pre&amp;gt;
            Value from the RTE {{myProperty.value}}
        &amp;lt;/pre&amp;gt;
    &amp;lt;/ng-form&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This is a little bit cleaner than the approach in option 1 but we still suffer from the problem that the directive could be processed before we have loaded all our external data. For example – we would probably like to set the $scope.myProperty.value to some value that's loaded from the backend –but with this approach the directive could be processed before that data is downloaded and we’ll be left with a ugly error message.&lt;/p&gt;
&lt;h4&gt;Option 3 – Use ng-repeat and an array to “lazy load”&lt;/h4&gt;
&lt;p&gt;As far as I have seen this is the best way to load data from the backend and then render the wysiwyg-editor. In my use case I want to have a specific data type configured and when the page loads I want to get the configuration (pre values) for that data type and put that data in $scope.myProperty.config. I also want to download some content from the backend and put that in $scope.myProperty.value.&lt;/p&gt;
&lt;p&gt;So – How do we avoid the directive from being processed before the data is loaded? A loop. Let’s put this in our view&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;umb-property 
    property="property"
    ng-repeat="property in properties"&amp;gt;
    &amp;lt;umb-editor model="property"&amp;gt;&amp;lt;/umb-editor&amp;gt;
&amp;lt;/umb-property&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;And then put an array of properties on the scope:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: js"&gt;$scope.properties = [{
                        label: 'bodyText',
                        description: '',
                        view: 'rte',
                        config: {
                            editor: {}, // empty for now
                            hideLabel: true
                        }, hideLabel: true
                    }];&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This would look almost the same as option 2 but. Since the ng-repeat attribute is there the directives will be reprocessed each time the $scope.properties-property change and since $scope.properties is null until after the data is downloaded the umb-editor directives will note be loaded.&lt;/p&gt;
&lt;p&gt;The full view could look something like this:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;div ng-controller="CustomSectionEditController"&amp;gt;    
    &amp;lt;ng-form&amp;gt;
        &amp;lt;umb-property 
            property="property"
            ng-repeat="property in properties"&amp;gt;
            &amp;lt;umb-editor model="property"&amp;gt;&amp;lt;/umb-editor&amp;gt;
        &amp;lt;/umb-property&amp;gt;
        &amp;lt;pre&amp;gt;
            Value from the RTE {{properties[0].value}}
        &amp;lt;/pre&amp;gt;
    &amp;lt;/ng-form&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;And the controller like this:&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;script type="text/javascript"&amp;gt;
    function CustomSectionEditController($scope) {
        $scope.property = {
            label: 'bodyText',
            description: 'Load some stuff here',
            view: 'rte',
            config: {
                editor: {
                    toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "table", "umbembeddialog"],
                    stylesheets: [],
                    dimensions: { height: 400, width: 250 }
                }
            }
        };
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Now the last step would be to make sure that the text-value for the editor is fetched from some backend service.&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;script type="text/javascript"&amp;gt;
    function CustomSectionEditController($scope, $http) {
        $http({ method: 'GET', url: '/url/to/our/cool/service' })
            .success(function (data) {
                $scope.property = {
                    label: 'bodyText',
                    description: 'Load some stuff here',
                    view: 'rte',
                    config: {
                        editor: {
                            toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "table", "umbembeddialog"],
                            stylesheets: [],
                            dimensions: { height: 400, width: 250 }
                        }
                    },
                    value: data
                };

            })
            .error(function () {
                $scope.error = "An Error has occured while loading!";
            });
    }
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;As you can see we added the $http-parameter to the controller and uses it to fetch the data that we need before assigning the values to the scope. This will prevent the umb-editor directive from starting to load before all our data is loaded.&lt;/p&gt;
&lt;p&gt;This is how I’ve solved the this issue at the moment and there may be other ways as well, please feel free to post questions or comments here below.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description>
      <pubDate>Wed, 04 Dec 2013 19:30:00 Z</pubDate>
      <a10:updated>2013-12-04T19:30:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">f4b102bf-2322-45ee-8b20-2390db6d70ad</guid>
      <link>https://www.enkelmedia.se/blogg/2013/11/22/custom-sections-in-umbraco-7-part-2-the-views?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Custom sections in Umbraco 7 – Part 2 the views</title>
      <description>&lt;p&gt;In the &lt;a href="https://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1" title="Creating custom sections in Umbraco 7 - Part 1"&gt;last post&lt;/a&gt; we talked about how to add a new custom application (or section) and a new custom tree to your &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; 7 backoffice. Now I’ll show you how to add views so that your sections can do something meaningful.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;You could use legacy views as well but since I was rewriting &lt;a href="http://www.newsletterstudio.org/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_campaign=blogg" target="_blank"&gt;Newsletter Studio&lt;/a&gt; to work use AngularJS and work really nice with Umbraco 7 I took this approach.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.newsletterstudio.org/features/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=custom%20section%20part%202&amp;amp;utm_campaign=blogg" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/17232/newsletterstudio-banner-580x250.png" alt="Newsletter Studio -banner -580x 250"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;The routing&lt;/h4&gt;&#xD;
&lt;p&gt;Since we added the PluginController(“CustomSection“)-attribute to our tree-class, Umbraco will route the cliend side requests to a folder in the app_plugins-folder. The logic is something like: /app_plugins/{applicationName}/{treeAlias}/{action}/itemId so in our case we’re looking at the url /#/CustomSection/CustomSectionTree/edit/dashboard and Umbraco will look for /app_plugins/customsection/backoffice/CustomSectionTree/edit.html to show as the view – so let’s create that file.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;The view&lt;/h4&gt;&#xD;
&lt;p&gt;Add this content to our new edit.html-file:&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;script&amp;gt;&#xD;
&#xD;
    function CustomSectionEditController($scope, $routeParams) {&#xD;
        $scope.content = { tabs: [{ id: 1, label: "Tab 1" }, { id: 2, label: "Tab 2" }] };&#xD;
&#xD;
        $scope.EditMode = function() {&#xD;
            return $routeParams.create == 'true';&#xD;
        };&#xD;
    }&#xD;
&amp;lt;/script&amp;gt;&#xD;
&#xD;
&amp;lt;div ng-controller="CustomSectionEditController"&amp;gt;&#xD;
&#xD;
    &amp;lt;umb-panel&amp;gt;&#xD;
    &amp;lt;umb-header tabs="content.tabs"&amp;gt;&#xD;
        &amp;lt;div class="umb-headline-editor-wrapper span12 ng-scope"&amp;gt;&#xD;
            &amp;lt;h1 class="ng-binding"&amp;gt;My custom section {{id}}&amp;lt;/h1&amp;gt;&#xD;
               &amp;lt;/div&amp;gt;&#xD;
    &amp;lt;/umb-header&amp;gt;&#xD;
&#xD;
    &amp;lt;umb-tab-view&amp;gt;&#xD;
        &amp;lt;umb-tab id="tab1" rel="svensson"&amp;gt;&#xD;
&#xD;
        &amp;lt;div class="umb-pane"&amp;gt;&#xD;
            This is tab content for tab 1&amp;lt;br/&amp;gt;&#xD;
           &amp;lt;p ng-show="EditMode()"&amp;gt;&#xD;
                   &amp;lt;span class="label label-warning"&amp;gt;In create mode, this label is only showed when the controller sees the create-querystring item.&amp;lt;/span&amp;gt;&#xD;
           &amp;lt;/p&amp;gt;&#xD;
        &amp;lt;/div&amp;gt;&#xD;
        &amp;lt;/umb-tab&amp;gt;&#xD;
&#xD;
        &amp;lt;umb-tab id="tab2" rel="kalle"&amp;gt;&#xD;
&#xD;
        &amp;lt;div class="umb-pane"&amp;gt;&#xD;
&#xD;
                    This is tab content for tab 2&#xD;
         &amp;lt;/div&amp;gt;&#xD;
        &amp;lt;/umb-tab&amp;gt;&#xD;
&#xD;
    &amp;lt;/umb-tab-view&amp;gt;&#xD;
&amp;lt;/umb-panel&amp;gt;&#xD;
&#xD;
&amp;lt;/div&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This code will give us a view that looks like this:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15794/WindowsLiveWriter_CustomsectionsinUmbraco7Part2theviews_12F1F_image_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/15799/WindowsLiveWriter_CustomsectionsinUmbraco7Part2theviews_12F1F_image_thumb.png" width="433" height="210" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Even if we could have added regular HTML in the view, I choose to include some AngularJS-stuff and some stuff that Umbraco adds on to AngularJS. The umb-tab, umb-tab-view, umb-panel-elements are something called &lt;a href="http://docs.angularjs.org/guide/directive" target="_blank"&gt;directives&lt;/a&gt; which is a core concept in AngularJS. These directives hide complex logic for generating the view that’s on the right and side of our backoffice. Directives are very powerfull and can be used to create reusable code and "widgets" in your application – let’s just ignore the details of this for now and focus on the code above.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;In the script-tag I create a regular JavaScript function that will act as the controller for the view, this function take a $scope-variable as parameter which will act as the "glue" between the controller and the view. &lt;a href="http://docs.angularjs.org/#!/guide/scope" target="_blank"&gt;$scope&lt;/a&gt; is a funamental part of AngularJS and should be familiar to you if you have worked with Angular before. Since the Umbraco's custom directives looks at the $scope.content.tabs-property when creating the tabs we need to populate this property with some static data – in this case the “Tab 1” and “Tab 2”-objects.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The only “magic” that you’ll need to be aware of is that Umbraco will match the id of the tab with the id of the &amp;lt;umb-tab&amp;gt;-tag. So &amp;lt;umb-tab id="tab1"&amp;gt; will be showed when you click the tab with id 1 – and &amp;lt;umb-tab id="tab2"&amp;gt; will be showed when you click the tab with id 2. Let’s look closer at the $routeParams and the CreateAction that &lt;a href="https://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1" title="Creating custom sections in Umbraco 7 - Part 1"&gt;we added to the TreeController-class in the last post&lt;/a&gt;.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;The menu items&lt;/h4&gt;&#xD;
&lt;p&gt;The MenuItemCollection, that the TreeController we created in the last post, returns a collection that just contains a ActionNew-item. This action will look for the view /app_plugins/CustomSection/Umbraco/CustomSectionTree/create.html which will be displayed when the user clicks the “Create new” button.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15804/WindowsLiveWriter_CustomsectionsinUmbraco7Part2theviews_12F1F_image_4.png"&gt;&lt;img src="https://www.enkelmedia.se/media/15809/WindowsLiveWriter_CustomsectionsinUmbraco7Part2theviews_12F1F_image_thumb_1.png" width="557" height="209" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I have use some code from the create content-dialog – lets add this to our create.html-view.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;div class="umb-dialog-body with-footer"&amp;gt;&#xD;
    &amp;lt;div class="umb-pane"&amp;gt;&#xD;
    &amp;lt;h5&amp;gt;&amp;lt;localize key="create_createUnder"&amp;gt;Create something under &amp;lt;/localize&amp;gt; {{currentNode.name}}&amp;lt;/h5&amp;gt;&#xD;
&#xD;
    &amp;lt;ul class="umb-actions umb-actions-child"&amp;gt;&#xD;
        &amp;lt;li&amp;gt;            &#xD;
            &amp;lt;a href="#/CustomSection/CustomSectionTree/edit/dashboard?create=true" ng-click="nav.hideNavigation()"&amp;gt;&#xD;
                &amp;lt;i class="large icon-car"&amp;gt;&amp;lt;/i&amp;gt; &#xD;
                &amp;lt;span class="menu-label"&amp;gt;New custom item&#xD;
                    &amp;lt;small&amp;gt;Click here to create this super custom item&amp;lt;/small&amp;gt;&#xD;
                &amp;lt;/span&amp;gt;&#xD;
            &amp;lt;/a&amp;gt;&#xD;
        &amp;lt;/li&amp;gt; &#xD;
    &amp;lt;/ul&amp;gt;&#xD;
    &amp;lt;/div&amp;gt;        &#xD;
&amp;lt;/div&amp;gt;&#xD;
&amp;lt;div class="umb-dialog-footer btn-toolbar umb-btn-toolbar"&amp;gt;&#xD;
        &amp;lt;button class="btn" ng-click="nav.hideDialog()"&amp;gt;&#xD;
            &amp;lt;localize key="buttons_somethingElse"&amp;gt;Do something else&amp;lt;/localize&amp;gt;&#xD;
        &amp;lt;/button&amp;gt;&#xD;
&amp;lt;/div&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Fri, 22 Nov 2013 21:07:00 Z</pubDate>
      <a10:updated>2013-11-22T21:07:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ed5aee4c-5468-40f7-af50-19f8dcd4b579</guid>
      <link>https://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Creating custom sections in Umbraco 7 - Part 1</title>
      <description>&lt;p&gt;Yesterday we finally got the the first release of &lt;a href="http://our.umbraco.org/contribute/releases/700" target="_blank"&gt;Umbraco 7&lt;/a&gt; which introduce a new look and feel for the backoffice. Not only that – the technicall differences from V6 is huge.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Since I'm writing the popular newsletter-package &lt;a href="http://www.newsletterstudio.org/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_campaign=blogg" target="_blank"&gt;Newsletter Studio&lt;/a&gt; for Umbraco I had look really deep into the source of Umbraco 7 to get things right.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.newsletterstudio.org/features/?utm_source=enkelmedia&amp;amp;utm_medium=click&amp;amp;utm_content=custom%20section%20part%201&amp;amp;utm_campaign=blogg" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/17232/newsletterstudio-banner-580x250.png" alt="Newsletter Studio -banner -580x 250"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;I now want to show you how to add a custom section with a custom tree to the &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; backoffice – some of the things is similar to how it used to work (in V4-6) and some things are new.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Creating the application&lt;/h4&gt;&#xD;
&lt;p&gt;Every section in &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; is called an application, so sections and applications is basically the same thing.The first thing we’ll need to do is to create the application. In this examples I will not fiddle with the xml-files or the database – I’ll use class annotations to create my section.&lt;/p&gt;&#xD;
&lt;p&gt;The first thing I’ll need to do is to create a class that implements the IApplication-interface so that Umbraco will initialize this class on start up.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;[Application("CustomSection", "CustomSection","icon-car", 15)]&#xD;
public class CustomSectionApplication : IApplication {}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This is not something new for V7, The "Application"-attribute basically tells Umbraco to create a new application:&lt;br /&gt;&lt;strong&gt;Name&lt;/strong&gt;: CustomSection&lt;br /&gt;&lt;strong&gt;Alias&lt;/strong&gt;: CustomSection&lt;br /&gt;&lt;strong&gt;Icon&lt;/strong&gt;: icon-car (the css class for the icon that will be displayed in the left side bar of the backoffice)&lt;br /&gt;&lt;strong&gt;Sort order&lt;/strong&gt;: 15&lt;/p&gt;&#xD;
&lt;p&gt;The next time Umbraco runs it will add an XML-element to the /config/applications.config-file that will add our new section/application to the Umbraco backoffice.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Creating the tree&lt;/h4&gt;&#xD;
&lt;p&gt;Before adding the tree, Umbraco will not care about your new application. An application without a tree is not worth anything =D Right?&lt;/p&gt;&#xD;
&lt;p&gt;This part contains some new concepts for V7. Let's start with creating a new class that inherits from Umbraco.Web.Trees.TreeController, make sure to suffix the class name with “Controller” ie. CustomSectionTreeController.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;public class CustomSectionTreeController : TreeController&#xD;
{&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Now we need to give Umbraco some extra information about our tree. Let's add two attributes on the class, the Tree and the PluginController-attributes.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;[PluginController("CustomSection")]&#xD;
[Umbraco.Web.Trees.Tree("CustomSection", "CustomSectionTree", "My custom section", iconClosed: "icon-doc")]&#xD;
public class CustomSectionTreeController : TreeController&#xD;
{&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;PluginController&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;This attribute tells Umbraco that this class is part of a plugin, and it also tells Umbraco the name of that plugin. This will make Umbraco look for views inside the /app_plugin/{NameOfApplication}/-folder and not in the folder of the core-views which is the default.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Tree&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;This attribute is “older” and has been around since somewhere around 4.7 I think. It tells Umbraco that this is a tree-class and Umbraco will add this to the /config/trees.config-file. In V7 this attribute is mandatory for a tree that inherits from the TreeController-class as some underlying logic is looking at the attribute values to determine the name of the tree.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The properties are:&lt;br /&gt;&lt;strong&gt;Application&lt;/strong&gt;: CustomSection (must match the name of the application we added before)&lt;br /&gt;&lt;strong&gt;Alias&lt;/strong&gt;: CustomSectionTree (the name/alias of the tree)&lt;br /&gt;&lt;strong&gt;Title&lt;/strong&gt;: The title of the tree (used as the name of the root node)&lt;br /&gt;&lt;strong&gt;Icon&lt;/strong&gt;: The icon (or class) used as the tree icon.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Alright. Almost there. Now we need to add some code to show items in the tree.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;[PluginController("CustomSection")]&#xD;
[Umbraco.Web.Trees.Tree("CustomSection", "CustomSectionTree","My custom section", iconClosed: "icon-doc")]&#xD;
public class CustomSectionTreeController : TreeController&#xD;
{&#xD;
    protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)&#xD;
    {&#xD;
        var nodes = new TreeNodeCollection();&#xD;
        var item = this.CreateTreeNode("dashboard", id, queryStrings, "My item", "icon-truck", true);&#xD;
        nodes.Add(item);&#xD;
        return nodes;&#xD;
    }&#xD;
&#xD;
    protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)&#xD;
    {&#xD;
       var menu = new MenuItemCollection();&#xD;
       menu.DefaultMenuAlias = ActionNew.Instance.Alias;&#xD;
        menu.Items.Add&amp;lt;ActionNew&amp;gt;("Create");&#xD;
        return menu;&#xD;
    }&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This will give us something like this:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15689/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_4.png"&gt;&lt;img src="https://www.enkelmedia.se/media/15694/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_thumb_1.png" width="408" height="393" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This code has two methods that are the &lt;span&gt;least&lt;/span&gt; we need to do to create a new section.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;GetTreeNodes (TreeNodeCollection)&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;This returns a collection of tree items, in our case we just return one item but we could of curse add more items to the collection. We use the CreateTreeNode-method from the base class to create a new node called “My item” with the id “dashboard”. Umbraco will append the id of the node to the URL later on so that we can handle the routing from our AngularJS-controllers.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;GetMenuForNode&lt;/span&gt; (MenuItemCollection)&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15699/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_6.png"&gt;&lt;img src="https://www.enkelmedia.se/media/15704/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_thumb_2.png" width="244" height="53" alt="image" border="0" style="display: inline; margin-left: 0px; margin-right: 0px; border: 0px;" align="right"/&gt;&lt;/a&gt;This method handles the “right click alternatives”. The “DefaultMenuAlias” configures which action that should be fired when we click the “touch dots” .&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;There's a lot of actions that you can use and you can also build your own ones.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15709/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/15714/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_thumb.png" width="347" height="631" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Displaying our new section&lt;/h4&gt;&#xD;
&lt;p&gt;To display our new section we need to give the current user access to it. Go to the users-section and open the edit-view for the current logged on user. In the bottom, check the checkbox for [CustomSection] and hit save. Now you’ll probably need to refresh the page using F5 to show the new section in the left side bar.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Making the [CustomSection]-text look better&lt;/h4&gt;&#xD;
&lt;p&gt;Since Umbraco can’t find any language translation for our section it will use the brackets and the application name. To make this nicer, open the /umbraco/config/lang/en.xml-field and look for the &amp;lt;area alias=”sections”&amp;gt;-element. Inside that element, just add:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;key alias="CustomSection"&amp;gt;Super Custom Section&amp;lt;/key&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15719/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_8.png"&gt;&lt;img src="https://www.enkelmedia.se/media/15724/WindowsLiveWriter_CreatingcustomsectionsinUmbraco7_12BCE_image_thumb_3.png" width="482" height="82" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;You may need to touch the root web.config file to restart the application before the new translation gets visible.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This is my first blog post about custom sections and custom trees in Umbraco 7 – next time I’ll you show how you can &lt;a href="https://www.enkelmedia.se/blogg/2013/11/22/custom-sections-in-umbraco-7-part-2-the-views" title="Custom sections in Umbraco 7 – Part 2 the views"&gt;create the views for the new tree items&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 22 Nov 2013 20:23:00 Z</pubDate>
      <a10:updated>2013-11-22T20:23:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e25568eb-2ad9-427c-8f9c-b01cd5d496dc</guid>
      <link>https://www.enkelmedia.se/blogg/2013/11/21/umbraco-7-is-finally-out?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco 7 is finally out!</title>
      <description>&lt;p&gt;After weeks of hard work from the &lt;a href="http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx" target="_blank"&gt;guys in the core team&lt;/a&gt; Umbraco 7 was released today! The biggest news is the new look and feel of the backoffice.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15654/WindowsLiveWriter_Umbraco7isfinallyout_13E6E_dashboard.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/15659/WindowsLiveWriter_Umbraco7isfinallyout_13E6E_dashboard_thumb.jpg" width="572" height="290" alt="dashboard" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;If you have used Umbraco before you’ll probably find your way around as the over all concepts are the same. If you know how to build websites with previous versions of Umbraco you’ll feel comfortable with V7 as well. The new backoffice has been built with the editors in mind and I must say that we’re seeing a lot of improvements! I really love the why that the people behind the design is thinking.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I’ve looked at the beta and RC-versions of V7 and provided some feedback (ie. the drag and drop into the media dialog) and I really recommend you to download the latest version and play with it! Start building your new sites with it! But it’s important to don’t leave your frustrations in your mind – share them at &lt;a href="http://issues.umbraco.org" target="_blank"&gt;issues.umbraco.org&lt;/a&gt; so that the core team can do something about it! It’s the least each and everyone can do to contribute to this great project!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Niels Hartvig posted a nice video of the new backoffice, have a look at it here: &lt;a href="http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx" target="_blank"&gt;http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 21 Nov 2013 21:38:00 Z</pubDate>
      <a10:updated>2013-11-21T21:38:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">a6f0fe46-f28d-48f5-aff4-e4243b6eb894</guid>
      <link>https://www.enkelmedia.se/blogg/2013/11/17/my-first-umbraco-training-is-over?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>My first Umbraco-training is over</title>
      <description>&lt;p&gt;Last week I hosted the first Umbraco Training Courses in Sweden. We now have more than 20 new certified Umbraco developers and some new companies have become Certified Partners.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Since it was my first course I can admit that I was a little bit nervous i the beginning of the week – I always get that feeling when stepping out of my “comfort zone” and doing something that I have never done before. So far I have only got good feedback from the attendees, some even called me “excellent” – thank you very much for that. =D&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I’ve been asked if we are going to have a new round of training in Sweden. Of course! But we have not decided the exact dates yet. If you want to be noticed – sign up for our newsletter.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a name="newsletter"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I also would like to share to share some photos from the course =D&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15554/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level1_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15559/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level1_thumb.jpg" border="0" alt="level1" width="594" height="430"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Level 1 attendees working on one of the exercises.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15564/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level2-book_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15569/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level2-book_thumb.jpg" border="0" alt="level2-book" width="594" height="460"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Level 2 workbook, razor-sheet sheet and the super fancy Umbraco USB that all attendees got a copy of.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15574/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level2-grupp_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15579/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level2-grupp_thumb.jpg" border="0" alt="level2-grupp" width="594" height="447"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Attendees at the level 2 course.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15584/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level2-grupp2_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15589/WindowsLiveWriter_MyfirstUmbracotrainingisover_BEE1_level2-grupp2_thumb.jpg" border="0" alt="level2-grupp2" width="594" height="328"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Closest in this picture we see attendees from &lt;a rel="noopener" href="http://www.lib.chalmers.se/" target="_blank"&gt;Chalmers in Gothenburg&lt;/a&gt; and from the Örebro-based company &lt;a rel="noopener" href="http://www.impera.se/" target="_blank"&gt;Impera&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 17 Nov 2013 12:33:00 Z</pubDate>
      <a10:updated>2013-11-17T12:33:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ff5ccb4a-6af7-406b-a48d-24132bcc9f85</guid>
      <link>https://www.enkelmedia.se/blogg/2013/11/5/agencies-gets-free-newsletters?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Agencies gets free newsletters</title>
      <description>&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15475/WindowsLiveWriter_Agenciesgetsfreenewsletters_1336A_feature-datatype_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/15480/WindowsLiveWriter_Agenciesgetsfreenewsletters_1336A_feature-datatype_thumb_316x224.jpg"  width="316"  height="224" alt="feature-datatype" border="0" style="margin-left: 25px;" align="right"/&gt;&lt;/a&gt;I you’re a long time reader of this blog you know that I’m working hard with my newsletter-package for Umbraco – &lt;a href="http://www.newsletterstudio.org/" target="_blank"&gt;Newsletter Studio&lt;/a&gt;.&lt;/p&gt;&#xD;
&lt;p&gt;Today I announced some news that I hope will make some of all the web agencies out there happy. As web agencies over the world will all get a free Newsletter Studio license for their own website.&lt;/p&gt;&#xD;
&lt;p&gt;So if you your company web site runs on Umbraco, don’t wait – request your &lt;a href="http://bit.ly/1789Nux" target="_blank"&gt;free license today&lt;/a&gt;!&lt;/p&gt;</description>
      <pubDate>Tue, 05 Nov 2013 20:50:00 Z</pubDate>
      <a10:updated>2013-11-05T20:50:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">c07e32e6-1784-46e7-b8ab-2c6e6fe873e3</guid>
      <link>https://www.enkelmedia.se/blogg/2013/9/25/back-from-the-dutch-umbraco-festival-2013?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Back from the Dutch Umbraco Festival 2013</title>
      <description>&lt;p&gt;I’m back in Sweden after a great weekend in the Netherlands. Last Friday was all about Umbraco as the local user group &lt;a rel="noopener" href="http://www.duug.nl/" target="_blank"&gt;DUUG&lt;/a&gt; (Dutch Umbraco User Group) was throwing an Umbraco Festival.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;There were a lot of great sessions to watch, for example &lt;strong&gt;Niels Hartvig&lt;/strong&gt; showed the latest about the Umbraco Concord (or Umbraco as a service) project which looks really really good! Also &lt;strong&gt;Jeavon Leopold&lt;/strong&gt; (&lt;a rel="noopener" href="https://twitter.com/crumpled_jeavon" target="_blank"&gt;@crumpled_jeavon&lt;/a&gt;) and &lt;strong&gt;Jeroen Breuer&lt;/strong&gt; (&lt;a rel="noopener" href="https://twitter.com/j_breuer" target="_blank"&gt;@j_breuer&lt;/a&gt;) hosted a nice framework session on there Umbraco Framework project: &lt;a href="https://github.com/jbreuer/Hybrid-Framework-Best-Practices"&gt;https://github.com/jbreuer/Hybrid-Framework-Best-Practices&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Me and some other package vendors spent a lot of time in the vendors booths showing our packages for the visitors.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15110/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-soren_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15115/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-soren_thumb.jpg" border="0" alt="duug-soren" width="594" height="379"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here I am with the &lt;a rel="noopener" href="http://www.ucommerce.net/" target="_blank"&gt;uCommerce&lt;/a&gt;-guy Søren Spelling Lund (&lt;a rel="noopener" href="https://twitter.com/publicvoid_dk" target="_blank"&gt;@publicvoid_dk&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15120/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-keynote_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15125/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-keynote_thumb.jpg" border="0" alt="duug-keynote" width="594" height="337"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just before the keynote that was held by Niels Hartvig (&lt;a rel="noopener" href="https://twitter.com/umbraco" target="_blank"&gt;@umbraco&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15130/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-people_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15135/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-people_thumb.jpg" border="0" alt="duug-people" width="594" height="303"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Some loaded Umbracians waiting for more sessions.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I also had the chance to host my own session about the &lt;a rel="noopener" href="http://www.newsletterstudio.org/" target="_blank"&gt;Newsletter Studio&lt;/a&gt;-package.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15140/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech1_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15145/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech1_thumb.jpg" border="0" alt="duug-speech1" width="594" height="377"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15150/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech2_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15155/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech2_thumb.jpg" border="0" alt="duug-speech2" width="594" height="413"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15160/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech3_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15165/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech3_thumb.jpg" border="0" alt="duug-speech3" width="594" height="394"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15170/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech4_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15175/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech4_thumb.jpg" border="0" alt="duug-speech4" width="594" height="390"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/15180/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech5_2.jpg"&gt;&lt;img style="display: inline; border: 0px;" src="https://www.enkelmedia.se/media/15185/WindowsLiveWriter_BackfromtheDutchUmbracoFestival2013_ED03_duug-speech5_thumb.jpg" border="0" alt="duug-speech5" width="594" height="307"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;br&gt;A very big thank you to the DUUGs-people and &lt;a rel="noopener" href="http://www.richardsoeteman.net/" target="_blank"&gt;Richard Soeteman&lt;/a&gt; for inviting me over! And thank you very much to everyone who attended my session!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you are looking for Umbraco speakers for your local event, don’t hesitate to contact me, by &lt;a rel="noopener" href="https://www.enkelmedia.se/kontakt" target="_blank" title="Kontakt"&gt;e-mail&lt;/a&gt;, on twitter: &lt;a rel="noopener" href="https://twitter.com/enkelmedia" target="_blank"&gt;@enkelmedia&lt;/a&gt; or on skype: enkelmedia&lt;/p&gt;</description>
      <pubDate>Wed, 25 Sep 2013 14:50:00 Z</pubDate>
      <a10:updated>2013-09-25T14:50:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">77afd08d-84de-4d16-8972-cbfd5375dca8</guid>
      <link>https://www.enkelmedia.se/blogg/2013/8/29/umbraco-pa-svenska?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco på svenska</title>
      <description>&lt;p&gt;English readers: Sorry - This is between me and the " swedes"=D&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Det var ett tag sedan som jag skev ett inlägg på svenska men jag kände att det var dax. I början av förra veckan blev det officiellt att jag, från och med denna höst, kommer att leda de svenska &lt;a href="#" title="Utbildning - Umbraco"&gt;Umbraco-utbildningarna&lt;/a&gt;.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Det känns riktigt stort och väldigt roligt!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/14677/WindowsLiveWriter_Umbracopsvenska_8105_umnbracooo_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/14682/WindowsLiveWriter_Umbracopsvenska_8105_umnbracooo_thumb.jpg" width="554" height="326" alt="umnbracooo" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;När jag hörde om Umbraco första gången i slutet av 2007 så tyckte jag först att det var ett krångligt och "svårgreppat" system. Kanske för att man var tvungen att ha koll på XSLT vilket jag inte hade då. Jag tror att det som lockade mig med detta CMS var att det lät mig ha full kontroll över den genererade HTML-koden. Det här var i en tid då jag precis hade fått lära mig att vi utvecklare inte skulle skriva HTML, CSS och JavaScript - allt skulle göras med ASP.NET-kontroller, det skulle bara vara att dra och släppa. Vi som varit med sedan Klassisk ASP-tiden skulle glömma allt vi visste - vi skulle upp en abstraktionsnivå.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Jag behöll lite av min förkärlek till grunderna för webben vilket har visats sig vara ett bra drag. Idag skämtar många om den kod som de tidigare generationerna av ASP.NET WebForms genererade. Idag handlar mycket om att "gå tillbaka till kärnan" och verkligen bejaka http-protokollet och webbens grundstenar.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;För mig är inte det är något nytt. &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco CMS&lt;/a&gt; har låtit mig göra detta ända sedan jag upptäckte det 2007. Idag kan man till och med välja mellan WebForms och MVC som grund i sin sajt och senare i höst kommer ett helt nytt backoffice (Bella aka. Umbraco 7) som är byggt i JavaScript med AngularJS. Umbraco ger mig möjlighet att skräddarsy mina projekt efter kundernas behov och de får ett system som de verkligen kan växa med.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Det händer en hel del spännande med Umbraco CMS och jag vill verkligen tipsa dig och dina kollegor om hösten kurser där du snabbt och enkelt kommer "up to speed" med både grunderna och nyheterna i Umbraco.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="#" title="Utbildning - Umbraco"&gt;Läs gärna mer&lt;/a&gt; om dem och tveka inte att &lt;a href="https://www.enkelmedia.se/kontakt" title="Kontakt"&gt;höra av dig&lt;/a&gt; om du har några frågor eller funderingar.&lt;/p&gt;</description>
      <pubDate>Thu, 29 Aug 2013 07:10:00 Z</pubDate>
      <a10:updated>2013-08-29T07:10:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ff20440a-d3a8-4db8-af4e-d0e28db01e62</guid>
      <link>https://www.enkelmedia.se/blogg/2013/6/13/locked-out-of-sql-server?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Locked out of SQL Server</title>
      <description>&lt;p&gt;Today I had problems with logging in to my newly installed SQL Server instance. During the install i choose “Windows mode” but I did mange to mess up which user that has access to SQL Server. I tried to start up in Single user mode which did not work, but I found this blog post that had a great solution:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.mssqltips.com/sqlservertip/2682/recover-access-to-a-sql-server-instance/"&gt;http://www.mssqltips.com/sqlservertip/2682/recover-access-to-a-sql-server-instance/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12919/Windows-Live-Writer_Locked-out-of-SQL-Server_F17C_sql-server-loggon_2.jpg"&gt;&lt;img title="sql-server-loggon" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="sql-server-loggon" src="https://www.enkelmedia.se/media/12924/Windows-Live-Writer_Locked-out-of-SQL-Server_F17C_sql-server-loggon_thumb.jpg" width="434" height="327"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h4&gt;Basically these steps:&lt;/h4&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;1. Install PSExec&lt;/p&gt; &lt;p&gt;2. Open the command line with “Run as administrator”&lt;/p&gt; &lt;p&gt;3. Run this command:&amp;nbsp; PsExec -s -i "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This will open SQL Server Management Studio as the NT AUTHORITY\SYSTEM-account which has all the privileges needed.&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jun 2013 15:17:14 Z</pubDate>
      <a10:updated>2013-06-13T15:17:14Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2007bf77-a487-4888-bb8e-c19994c770b4</guid>
      <link>https://www.enkelmedia.se/blogg/2013/6/3/git-source-control-system?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Git Source Control System</title>
      <description>&lt;p&gt;About a year ago I started to get frustrated about not being a part of the "Git-buzz". Everybody talked about git and how fantastic it was so I realized that I had to take a look at it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'm no Git-guru, so don't expect a deep tutorial, this is more off a diary of my experiences with learning about the git source control system.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12844/Windows-Live-Writer_8f3be2032b40_AC1D_git-status_2.jpg"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" src="https://www.enkelmedia.se/media/12849/Windows-Live-Writer_8f3be2032b40_AC1D_git-status_thumb.jpg" border="0" alt="git-status" width="610" height="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Central vs. Distributed&lt;/h4&gt;
&lt;p&gt;I came from Microsoft's TFS (Team Foundation Server) which I liked a lot, the integrated experience with Visual Studio is awesome! But it was a little bit to "heavy" for me and it was hard to use with other systems as some of my co-workers don't use VS, work on macs etc.&lt;/p&gt;
&lt;p&gt;The difference between central systems (TFS and Subversion) and distributed (Git and Mercurial) is that with distributed systems you don't need a central server to store the repository. Each developer has its own local copy of the both the code and the whole repository including history.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This may sound strange but is actually very nice! One example is that it very easy to create a new repository - just a one line command in the bash and you are good to go.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Another thing to notice is that you never "commit" changes to a central server, you always commit to your local repository. If you later on need to transfer you changes to someone else or to a central storage (like Github or Bitbucket) you "push" your repository there.&lt;/p&gt;
&lt;p&gt;This could be confusing when you first look at Git. There is no central server, there is just different places (called remotes) where the repository is stored and then you push and fetch changes between them. So in other words Github, Bitbucket or even your Dropbox can be a place to store the repository BUT you don't need to store it there - its totally fine with just having the local repository on your machine.&lt;/p&gt;
&lt;h4&gt;Git vs. Mercurial&lt;/h4&gt;
&lt;p&gt;When I first started to look at Git I also found Mercurial interesting. Both these source control systems are great but I found Mercurial simpler to get started with and easier to use. Mostly, I think, because of the fact that the tooling around Mercurial was better at that time.&lt;/p&gt;
&lt;p&gt;I would say that in an average developers work week there is no major differences in what the systems can do. But because of the "Git-buzz" I ignored the fact that Mercurial seemed easier and got down to work with learning the basics of Git (Yes, I wanted to be one of the cool guys).&lt;/p&gt;
&lt;h4&gt;Getting started&lt;/h4&gt;
&lt;p&gt;After installing Git on the machine, create a folder where you would like to keep your source code and open the git bash (right click and choose "Git bash from here"). To create a repository, write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git init&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Your repository is now created, if this is the first time you are using Git you'll also need to setup your name and email. The Git configuration can be applied both on a "per repository" basis and on a global level (per user). To set the users name for the current repository, write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git config user.name "Your Name Here"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;To set up the email, write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git config user.email "your@email.com"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The name and email is used to associated the code that you commit with your email so that we can know who added what to the repository. You will probably have more than one repository on your computer so it's a lot better to set up a global name and email.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git config --global user.name "Your Name Here"&lt;/p&gt;
&lt;p&gt;git config --global user.email "Your Name Here"&lt;/p&gt;
&lt;h4&gt;Commit, add and stage&lt;/h4&gt;
&lt;p&gt;There is one concept in Git that I had a hard time to understand in the beginning - staging. Because when you add a file you will need to:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add the file to the repository&lt;/strong&gt;&lt;br&gt;Means that you tell Git to add this file to the repository and to keep track of all the changes. This is done using "git add (filename)" or if you want git to track all new files "git add -A".&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stage the file for commit&lt;/strong&gt;&lt;br&gt;This is the tricky part. Even if the files is added to the repo, changes are not automatically "staged" (or add) for a commit. Let's say that you change file A and B, both are added to the repo but you would like to have one commit per file. Then you can first stage file A and commit, and then stage file B and commit. Think of the stage-area as a confirmation of which changes to save in a commit. You stage your files using git add.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Commit the changes&lt;/strong&gt;&lt;br&gt;When you want to store some changes you do that as a commit. If you have staged the files you just need to write "git commit" and you'll have to provide a commit message.&lt;br&gt;An easier way is to write: git commit -m "Message goes here".&lt;br&gt;Sometimes you would like to exclude files (ie. dlls) from the repository and you can do that by adding a .gitignore file to the root of your repository. Git will now ignore these files and you will never be prompted to add them to the tracking.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12854/Windows-Live-Writer_8f3be2032b40_AC1D_git-staged-files_2.jpg"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" src="https://www.enkelmedia.se/media/12859/Windows-Live-Writer_8f3be2032b40_AC1D_git-staged-files_thumb.jpg" border="0" alt="git-staged-files" width="610" height="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This is how git status would look when file1.txt is staged but not file2.txt&lt;br&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;What I learned that I use daily&lt;/h4&gt;
&lt;p&gt;What you will notice when reading about Git is that it's like a "swish army knife" that can do what every you would possibly want. But I have found myself using 11 commands on a daily basis.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;git status&lt;/h4&gt;
&lt;p&gt;This command show a summary of all the changes that has not been commited. It will also show untracked files that has been added to the folders that the repository watches (and that are not ignored by the .gitignore-file).&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;git log&lt;/h4&gt;
&lt;p&gt;The log shows the commits that has been made to the repository. Just write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git log&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I prefer a cleaner way to view my commits and by adding some parameters we can get a great look and feel:&lt;br&gt;&lt;br&gt;git log --oneline --graph --decorate --all&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12864/Windows-Live-Writer_8f3be2032b40_AC1D_git-screenshot-logall_2.jpg"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" src="https://www.enkelmedia.se/media/12869/Windows-Live-Writer_8f3be2032b40_AC1D_git-screenshot-logall_thumb.jpg" border="0" alt="git-screenshot-logall" width="610" height="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;git commit&lt;/h4&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This is the command to save the changes into a commit. If you have not added any new files (just made changes) you can write:&lt;/p&gt;
&lt;p&gt;git commit -am "My commit message"&lt;/p&gt;
&lt;p&gt;The a tells git to stage all changed files and the m is a shortcut for a inline commit message.&lt;/p&gt;
&lt;h4&gt;git add&lt;/h4&gt;
&lt;p&gt;If you have added files to the repository you'll need to tell Git to keep track of them. You can do that using&lt;/p&gt;
&lt;p&gt;git add -A&lt;/p&gt;
&lt;p&gt;The -A tells git to add all files, I tend to always use this and create ignore-rules in my .gitignore-file to avoid files that I don't want to add to the repo.&lt;/p&gt;
&lt;h4&gt;git checkout&lt;/h4&gt;
&lt;p&gt;To understand the checkout command you'll need to know about branched. Branches are used to keep different version of you code base in a certain stage. A common pattern is to have a master-branch where you always have stable code that are good to release, a development-branch where you do your development and you then merge your changes from the development-branch into the master when you are ready to release. This way you can always go back to the master branch and create a hotfix-branch to solve a urgent problem and provide a patch-release.&lt;/p&gt;
&lt;p&gt;To switch between branches you write:&lt;/p&gt;
&lt;p&gt;git checkout NameOfBranch&lt;/p&gt;
&lt;p&gt;If you would like to create a new branch from the branch that you're currently on, write:&lt;/p&gt;
&lt;p&gt;git checkout -b NameOfNewBranch&lt;/p&gt;
&lt;h4&gt;git merge&lt;/h4&gt;
&lt;p&gt;When you want to pull in changes from another branch you do that using the merge-command. You'll need to checkout the branch that you want to merge to, and write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git merge NameOfBranchToPullIn&lt;/p&gt;
&lt;h4&gt;git branch&lt;/h4&gt;
&lt;p&gt;If you just write git branch you'll get a list if all the branches in your repository. It's a good practice to remove branches that has been merged:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git branch -d NameOfBranchToDelete&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;It is the magic -d that tells git to remove the branch. If the branch has not been merge you'll get an error and you need to "force"-delete the branch with&lt;/p&gt;
&lt;p&gt;git branch -D NameOfBranchToDelete&lt;br&gt;&lt;br&gt;Note: the capital D means force delete.&lt;/p&gt;
&lt;h4&gt;git tag&lt;/h4&gt;
&lt;p&gt;All commits in Git gets a strange name which is a hash ex. mmqe7yf. The commit also has a message to give the commit some meaning. But how do you know which commit is the last one in version 1.0 of your code base? That's where tagging comes in to place. To add a tag write&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git tag -a V1.0 -m "Version 1.0"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Just replace the name "V1.0" and the commit message with whatever that suites your project.&lt;/p&gt;
&lt;h4&gt;git clone&lt;/h4&gt;
&lt;p&gt;The clone command is used to create a new repository and pull it down from ie. Github or Bitbucket. Both these storage-providers has examples of how to clone the repos when you view the repos on these site but basically you say&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git clone https://path.to.my/repository.git&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;One important thing to know is that Git will add something called a "remote". Think of the remote as a storage-place or a co-worker. When you later on push and pull changes you always push to a certain remote. Most of the time I only have one default remote (ie. Github or Bitbucket) and in git the standard name for that remote is origin. So when you clone a repo from ie. Github there will automatically be a remote called origin added to your repository.&lt;/p&gt;
&lt;h4&gt;git push&lt;/h4&gt;
&lt;p&gt;When you have committed some local changed and want to push them to you storage or to a co worker just use&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git push&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you have included tags on a commit, write&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git push --tags&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;To push tags as well. If you want to push a branch you'll write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git push origin NameOfBranch&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Where origin is the name of the remote that we want to push to.&lt;/p&gt;
&lt;h4&gt;git pull&lt;/h4&gt;
&lt;p&gt;The pull command does the opposite to push, it fetches changes from the server (there is actually a git fetch-command but pull is kind of shortcut that auto-merges any changes).&lt;/p&gt;
&lt;p&gt;To pull changes from a remote just write&lt;/p&gt;
&lt;p&gt;git pull&lt;/p&gt;
&lt;p&gt;This will pull down changes from the origin-remotes master branch. If you want to specify which remote and branch to pull down you can write:&lt;/p&gt;
&lt;p&gt;git pull RemoteName BranchName&lt;/p&gt;
&lt;h4&gt;git stash&lt;/h4&gt;
&lt;p&gt;The stash is a "temporary place to store changes". Let's say that you have made some changes that are not ready to be committed but you need to checkout something else. Then you can store the changes in a stash and apply them later (or remove them if you change your mind).&lt;/p&gt;
&lt;p&gt;Adding all current changes to the stash:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git stash&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The stash can contain a list of stored stashes, to apply the top level stash write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git stash apply&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you want to see a list of all the stashed write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git stash list&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;and if you want to remove the top level stash write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git stash pop&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;More on this: http://git-scm.com/book/en/Git-Tools-Stashing&lt;/p&gt;
&lt;h4&gt;git rebase&lt;/h4&gt;
&lt;p&gt;To understand the concept of rebasing you'll need to know how branches works. A branch is created out of a commit. Let's say that the master branch has three commits: A, B and C. We create a new feature-branch from the C-commit and starts to work. When we are ready to merge back to the master branch we notice that someone has added commits D and E to the master branch. Our feature-branch is now based on a commit that is not the most current one on master so when we try to merge the feature-branch into master we may have to handle some merge conflicts. We could decide to merge, handle any conflicts and then commit the merge-changes OR we could choose to rebase the feature-branch.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;We can tell git to move the "base commit" for the feature branch from commit C to commit E by checking out the feature branch and write&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git rebase master&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This will take to latest commit from master and use that as the "base commit" for our branch. This means that all the changes from commit D and E will already be in the feature branch and our merge will now probably be very smooth without conflicts.&lt;/p&gt;
&lt;p&gt;More on rebasing: http://git-scm.com/book/en/Git-Branching-Rebasing&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Git merge with squash&lt;/h4&gt;
&lt;p&gt;If you've been working in a feature branch and created several commits you might want to merge this into your master-branch but as one big commit. Let's say we have a feature-branch called feature1 with 3 commits that we want to merge into master as one commit.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Checkout feature1 and rebase this based on master&lt;/strong&gt;&lt;br&gt;git checkout feature1&lt;br&gt;git rebase master&lt;br&gt;&lt;br&gt;Note: If there are conflicts you might need to fix them and continue with &lt;br&gt;git rebase --continue&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Checkout master and squash-merge:&lt;/strong&gt; &lt;br&gt;git checkout master&lt;br&gt;git merge feature1 --squash&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Commit to master&lt;/strong&gt;&lt;br&gt;Your working copy will now have all changes from feature1 as Staged changed. We need to commit them on the master branch.&lt;br&gt;git commit -am "Added feature1"&lt;br&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remove the feature-branch.&lt;/strong&gt; &lt;br&gt;git branch -D feature1&lt;br&gt;&lt;br&gt;Note: The capital D will force delete the branch.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Git alias&lt;/h4&gt;
&lt;p&gt;An alias is a "shortcut" to a longer command. Ie. you'll get very tired of writing&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git log --oneline --graph --decorate --all&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Every time that you would like a nice presentation of your commits. It would be a lot cleaner to add a alias.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git config alias.logall "log --oneline --graph --decorate --all"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This will add a new alias called "logall" which will do the same as "log --oneline --graph --decorate --all". That you can use like this:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git logall&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Since we added this to the local gif-config it will only work in this repository. To make it global write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;git config --global alias.logall "log --oneline --graph --decorate --all"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you want to peek around in the config files the local config for a repository is in the hidden .git-folder and called "config". The global config is found here: " C:\Users\Username\.gifconfig". You can open them in a text editor and change the content - it doesnt matter if you write command line commands to configure or write directly in the config files.&lt;/p&gt;
&lt;p&gt;https://git.wiki.kernel.org/index.php/Aliases&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Edits - Some other stuff that I did not blog about last time&lt;/h4&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Removing a file from the repo&lt;/p&gt;
&lt;p&gt;If you have added a file and later on wants to remove it. Just write:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span&gt;git rm --cached filename&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To remove the file. Make sure to update gitignore to not re-add the file again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 03 Jun 2013 21:51:00 Z</pubDate>
      <a10:updated>2013-06-03T21:51:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">72f376f0-e269-4fc8-9dc8-1929b73f22a9</guid>
      <link>https://www.enkelmedia.se/blogg/2013/5/2/why-linq2umbraco-can-be-a-trap?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Why Linq2Umbraco can be a trap</title>
      <description>&lt;p&gt;Some time ago I took over a Umbraco e-commerce website built with a custom web shop implementation. No fancy stuff, just categories, products, a basket and a checkout. The site owner complained that Umbraco was slow and that the loading times (sometime 5-10 seconds for one page) where unacceptable. Since I have been working with Umbraco for years I know that the system is superfast if used in the right way – so I defended Umbraco.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;h4&gt;Why was the website slow?&lt;/h4&gt;&#xD;
&lt;p&gt;When I was looking for the source of the “slowness” I learned something about Linq2Umbraco that I have never thought of as a problem.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Linq2Umbraco what?&lt;/h4&gt;&#xD;
&lt;p&gt;If you have never heard of &lt;strong&gt;Linq2Umbraco&lt;/strong&gt; it’s a very handy piece of technology included in the Umbraco core. &lt;a href="http://www.aaron-powell.com" target="_blank"&gt;Aaron Powell&lt;/a&gt; wrote this and I think it was first included in Umbraco v4.5.0?&lt;/p&gt;&#xD;
&lt;p&gt;It’s basically a way to query the published and cached Umbraco data from your code using the Linq-syntax. A query could look like this:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;var products = from p in MyUmbracoContext.Products&#xD;
                       where p.Price &amp;gt; 100&#xD;
                       select p;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;This approach is a lot cleaner than using for example XPath to perform the same query and a lot more readable!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12694/WindowsLiveWriter_WhyLinq2Umbracocanbeatrap_774F_umbraco-linq2umbraco-doctypes_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/12699/WindowsLiveWriter_WhyLinq2Umbracocanbeatrap_774F_umbraco-linq2umbraco-doctypes_thumb.png" width="230" height="304" alt="umbraco-linq2umbraco-doctypes" border="0" style="display: inline; margin-left: 0px; margin-right: 0px; border: 0px;" align="right"/&gt;&lt;/a&gt; To use Linq2Umbraco you just right click the “Document Types”-folder in the settings-section and Export your document types as C#-classes.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Umbraco will now generate a code file with your document types as POCO-classes and create an UmbracoContext that will be used to query the data.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12704/WindowsLiveWriter_WhyLinq2Umbracocanbeatrap_774F_umbraco-linq2umbraco-export_4.png"&gt;&lt;img src="https://www.enkelmedia.se/media/12709/WindowsLiveWriter_WhyLinq2Umbracocanbeatrap_774F_umbraco-linq2umbraco-export_thumb_1_305x269.jpg"  width="305"  height="269" alt="umbraco-linq2umbraco-export" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;This is great! What is your problem?&lt;/h4&gt;&#xD;
&lt;p&gt;With great power comes great responsibility, &lt;em&gt;Linq2Umbraco&lt;/em&gt; is great but it’s not the solution to all our problems. As Aaron writes in his article on &lt;a href="http://www.aaron-powell.com/iqueryable-linq-to-umbraco" target="_blank"&gt;“Why no IQueryable in LINQ to Umbraco?”&lt;/a&gt; Linq2Umbraco will take &lt;strong&gt;&lt;span&gt;all&lt;/span&gt;&lt;/strong&gt; the content of the xml-cache and convert it to an in memory collection and from there parse that collection.&lt;br /&gt;&lt;br /&gt;This means that if you have 20-40 nodes in your content section during development you site will be superfast. BUT. When the site is in production and the client adds all there 5000 content nodes we run into a problem.&lt;br /&gt;&lt;br /&gt;The project that I was working with used Linq2Umbraco for all the interaction with the Umbraco cache. Even if they just needed one node from the cache they wrote something like:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;var products = (from p in MyUmbracoContext.Products&#xD;
                       where p.Id == 2555&#xD;
                       select p).First();&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Think about that query for a while. What will happen during execution?&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: Linq2Umbraco will grab the XML-cache and parse that in to a in memory collection of objects. In this case with over 5000 products only just this action takes around 2-3 seconds. Our code will now run the conditions (where p.Id = 2555) on that in memory collection and return the product with an id of 2555.&lt;br /&gt;&lt;br /&gt;Since Linq2Umbraco creates this in memory collection its very expensive to run queries on sites with a lot of document types. I ended up creating another repository implemented with XPath to get just one node, and for more advanced queries (not something I did in this project) I would look at Examine. &lt;br /&gt;&lt;br /&gt;So to wrap up. If you know that your site may grow over something like 100 nodes, &lt;span&gt;&lt;strong&gt;do not use Linq2Umbraco if you are not 100% sure what your are doing.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 02 May 2013 06:28:00 Z</pubDate>
      <a10:updated>2013-05-02T06:28:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">63bd3ed2-5ad8-4a23-a162-d1f5014db5bc</guid>
      <link>https://www.enkelmedia.se/blogg/2013/4/12/presentation-at-umbraco-dk-festival?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Presentation at Umbraco DK Festival</title>
      <description>&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12644/WindowsLiveWriter_PresentationatUmbracoDKFestival_11378_BHpFsSuCEAAtH6a_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/12649/WindowsLiveWriter_PresentationatUmbracoDKFestival_11378_BHpFsSuCEAAtH6a_thumb.jpg" width="522" height="392" alt="BHpFsSuCEAAtH6a" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Today I’m in Aarhus, Denmark for the yearly Umbraco Festival. A great day that &lt;a href="http://kraftvaerk.net/" target="_blank"&gt;Kraftvaerk&lt;/a&gt; had put together. I had the chance to show Newsletter Studio and also to tell the world about the new site &lt;a href="http://www.newsletterstudio.org" target="_blank"&gt;newsletterstudio.org&lt;/a&gt; where we'll be collecting documentation, support and also selling licenses.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;No its beer time =D&lt;/p&gt;</description>
      <pubDate>Fri, 12 Apr 2013 17:34:00 Z</pubDate>
      <a10:updated>2013-04-12T17:34:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">dc29ca3e-8c09-4b0e-b344-f76e8b402496</guid>
      <link>https://www.enkelmedia.se/blogg/2013/3/17/umbraco-packages-install-actions-and-user-control?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco Packages – Install actions and user control</title>
      <description>&lt;p&gt;When you create a package for Umbraco you can specify a user control that will be loaded during the installation. This user control will be shown to the users who installs your package into his/hers Umbraco installation.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/12555/WindowsLiveWriter_UmbracoPackagesInstallactionsandusercont_1208A_image_thumb_1.png" width="327" height="93" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;You can also add something called “&lt;a href="http://our.umbraco.org/wiki/reference/packaging/package-actions" target="_blank"&gt;Package Actions&lt;/a&gt;”, these are basically small actions that are configured with XML. The package actions can do stuff like adding a new section, adding a tree, adding a dashboard, add xslt/rest extensions and much more. There is actually a community project that extends this even more with a lot of features – have a look at &lt;a href="http://our.umbraco.org/wiki/reference/packaging/package-actions/community-made-package-actions" target="_blank"&gt;Package Action Contrib&lt;/a&gt;.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/12565/WindowsLiveWriter_UmbracoPackagesInstallactionsandusercont_1208A_image_thumb.png" width="290" height="225" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;If you want to take it even further you can also create your own Package Actions that you can call from your package action XML. The implementation of a Package Action is quite simple and straight forward, see this &lt;a href="http://packageactioncontrib.codeplex.com/SourceControl/changeset/view/79962#645089" target="_blank"&gt;example&lt;/a&gt;, the only thing you need is to implement the IPackageAction-interface and put the compiled dll in the bin-folder.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Now – what’s new about this?&lt;/h4&gt;&#xD;
&lt;p&gt;Nothing really. But I came to think about one thing today. In which order is everything executed? How does it work? So I came up with this little picture.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12570/WindowsLiveWriter_UmbracoPackagesInstallactionsandusercont_1208A_Umbraco_Package_Install_Pipeline-Enkel-Media_4.png"&gt;&lt;img src="https://www.enkelmedia.se/media/12575/WindowsLiveWriter_UmbracoPackagesInstallactionsandusercont_1208A_Umbraco_Package_Install_Pipeline-Enkel-Media_thumb_1.png" width="610" height="323" alt="Umbraco_Package_Install_Pipeline-Enkel-Media" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;1. Copy and create&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;In the first step all files are copied. It’s both the files that you picked on the “Package Files”-tab when creating your package and the files needed for css, templates, avascript, macros and so on.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;2. Package Actions&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Next Umbraco loads all the package actions. This is &lt;strong&gt;important to notice:&lt;/strong&gt; it instantiate all the IPackgeAction-classes first and then executes them in the order they are present in the XML-configuration. &lt;br /&gt;&lt;br /&gt;So if we our configuration looked like this:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;Action runat="install" undo="true" alias="Action1"&amp;gt;&amp;lt;/Action&amp;gt;&#xD;
&amp;lt;Action runat="install" undo="true" alias="Action3"&amp;gt;&amp;lt;/Action&amp;gt;&#xD;
&amp;lt;Action runat="install" undo="true" alias="Action2"&amp;gt;&amp;lt;/Action&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Umbraco would first create an instance of each action and then call the Execute-method on Action1, Action3 and Action2 – in that order.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;3. User Control&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;When this is done Umbraco will show the user control that you configured – if you did not configure a user control a generic message will be shown.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/12585/WindowsLiveWriter_UmbracoPackagesInstallactionsandusercont_1208A_image_thumb_2.png" width="548" height="203" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 17 Mar 2013 10:23:00 Z</pubDate>
      <a10:updated>2013-03-17T10:23:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ff033573-3d61-433f-8e56-35cdb41a55a8</guid>
      <link>https://www.enkelmedia.se/blogg/2013/1/25/yeaaaahhh-i-m-a-umbraco-certified-developer?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Yeaaaahhh I’m a Umbraco Certified Developer!!</title>
      <description>&lt;p&gt;After spending a week learning about &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; in great Copenhagen I’m finally at the goal.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12448/WindowsLiveWriter_YeaaaahhhImaUmbracoCertifiedDeveloper_E743_test_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/12453/WindowsLiveWriter_YeaaaahhhImaUmbracoCertifiedDeveloper_E743_test_thumb.jpg" width="564" height="359" alt="test" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Thanks Per &lt;a href="https://twitter.com/perploughansen" target="_blank"&gt;@perploughanse&lt;/a&gt; and Sebastiaan &lt;a href="https://twitter.com/cultiv" target="_blank"&gt;@cultiv&lt;/a&gt; for a great course!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;And by the way if you are planning to attend a course, don’t go to “Billy Booze”-bar the night before. Bad idea.&lt;/p&gt;</description>
      <pubDate>Fri, 25 Jan 2013 15:26:00 Z</pubDate>
      <a10:updated>2013-01-25T15:26:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">f76e84d9-0775-406b-ad26-2af65e369253</guid>
      <link>https://www.enkelmedia.se/blogg/2013/1/24/the-new-data-layer-in-umbraco-6?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>The new data layer in Umbraco 6</title>
      <description>&lt;p&gt;I actually started working on this blog post when i was i Thailand over Christmas. I sat down at the beach cafe by our hotel and my view looked something like this:&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12413/WindowsLiveWriter_ThenewdatalayerinUmbraco6_A307_IMG_2878_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/12418/WindowsLiveWriter_ThenewdatalayerinUmbraco6_A307_IMG_2878_thumb.jpg" width="564" height="424" alt="IMG_2878" border="0" style="display: inline; border-width: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Perfect condition for reading the new Umbraco 6 source code! =D&lt;/p&gt;&#xD;
&lt;h4&gt;New data layer using PetaPoco&lt;/h4&gt;&#xD;
&lt;p&gt;The new data layer in Umbraco 6 is using the superfast Mirco ORM &lt;a href="http://www.toptensoftware.com/petapoco/" target="_blank"&gt;PetaPoco&lt;/a&gt; which is &lt;a href="http://www.toptensoftware.com/Articles/94/PetaPoco-More-Speed" target="_blank"&gt;aaaaalmost as fast&lt;/a&gt; as hand coding the SQL queries with the ADO.NET classes – any case it’s a lot faster then ie. EF or nHibernate.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I used PetePoco in one of my projects about a year ago and I’m very happy with how it works. The implementation in Umbraco is even better than the “standard” PetaPoco as it comes with some extra classes and helper that helps you make the SQL-queries even more database agnostic.&lt;/p&gt;&#xD;
&lt;h4&gt;Demo 1.0&lt;/h4&gt;&#xD;
&lt;p&gt;Just to show you how simple it is to use the new data layer to fetch data from custom tables I’ll show you the simplest example.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I this example we have a custom table in the Umbraco database called 'ext_Contacts' which has three columns: ContactId, Name and Phone. First we create a &lt;a href="http://en.wikipedia.org/wiki/Plain_Old_CLR_Object" target="_blank"&gt;POCO&lt;/a&gt; class to act as our model.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;public class Contact&#xD;
{&#xD;
  public Int32 ContactId { get; set; }&#xD;
  public String Name{ get; set; }&#xD;
  public String Phone{ get; set; }&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;This object has no idea of what context it’s used in, it doesn't know anything about Umbraco, PetaPOCO or any other infrastructure in the project. To use the Umbraco data layer to receive a collection of contacts from the database you just simply use the this code:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;// Get the current database object&#xD;
var db = ApplicationContext.Current.DatabaseContext.Database;&#xD;
// Fetch a collection of contacts from the db.&#xD;
var listOfContacs = db.Fetch&amp;lt;Contact&amp;gt;(new Sql().Select("*").From("ext_Contacts"));&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; This code looks like any other PetaPOCO implementation and you could download a stand alone version of PetaPOCO and use this in you own (non Umbraco) project in the same way. The Fetch-method is smart enough to grab the data from the db-table and map it to the Contact-object. If your properties don’t match the column name you will need to do some configuration to get this working.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The great thing with this code is that it will work no matter which database you are running on – you don’t have to care. I’m going to use this approach in the next version of &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/newsletter-studio" target="_blank"&gt;Newsletter Studio&lt;/a&gt; for Umbraco to rewrite the data access layer to not use EF any more.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;With all this said &lt;strong&gt;&lt;span&gt;you should not use this method&lt;/span&gt;&lt;/strong&gt; to fetch content, media, members or anything else from the Umbraco core – then you should use the new Services that Niels Hartvig explains in this &lt;a href="http://umbraco.com/follow-us/blog-archive/2013/1/22/introducing-contentservice-aka-the-v6-api.aspx" target="_blank"&gt;blog post&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 24 Jan 2013 12:10:00 Z</pubDate>
      <a10:updated>2013-01-24T12:10:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e8779616-bb32-4e70-8662-b86adea1c561</guid>
      <link>https://www.enkelmedia.se/blogg/2013/1/22/first-day-with-umbraco-training-in-copenhagen?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>First day with Umbraco Training in Copenhagen</title>
      <description>&lt;p&gt;Today I started the first day at the level 1 course for Umbraco CMS. Most off the stuff that we talked about was very basic but I did find out some new tips and tricks that I would like to share with you.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12338/WindowsLiveWriter_FirstdayinCopenhagen_9A8F_bild_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/12343/WindowsLiveWriter_FirstdayinCopenhagen_9A8F_bild_thumb.jpg" width="413" height="314" alt="Umbraco course in Copenhagen january 2013" border="0" style="display: inline; border-width: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Creating custom templates for scripting files&lt;/h4&gt;&#xD;
&lt;p&gt;When you create a new macro script you will get a list of pre defined templates that you can start from.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12348/WindowsLiveWriter_FirstdayinCopenhagen_9A8F_image_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/12353/WindowsLiveWriter_FirstdayinCopenhagen_9A8F_image_thumb.png" width="408" height="371" alt="Create new scripting file in Umbracos backoffice" border="0" style="display: inline; border-width: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;If you want to extend this list with your own custom templates it’s very easy. Just drop your template as a “.cshtml”-file inside of the folder &lt;em&gt;“\umbraco\scripting\templates\cshtml\”&lt;/em&gt; and your set.&lt;br /&gt;&lt;br /&gt;Same thing goes for XSLT-templates but they are stored in &lt;em&gt;“\umbraco\xslt\templates\”&lt;/em&gt;. If you macro template uses the new schema put it in &lt;em&gt;“\umbraco\xslt\templates\Schema2\”&lt;/em&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Highlight the current menu item&lt;/h4&gt;&#xD;
&lt;p&gt;When looping out menu items I used to run a check to see if the current page id is equal to the current item in the rendered collection. If so – I added some kind of class to the generated link to indicate that this is the currently selected menu item.&lt;/p&gt;&#xD;
&lt;p&gt;Today i discovered this little Razor-helper: @nodeItem.IsAnsestorOrSelf(Model, "current", "").&lt;/p&gt;&#xD;
&lt;p&gt;I’m not sure how long it’s been there but since I often start coding from old bootstrap-projects I’ve missed this little helpful feature. If you want to have a look at it, create a new macro script in the developers section and choose the “Navigation” template.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@{ &#xD;
    @*Get the root of the website *@&#xD;
    var root = Model.AncestorOrSelf(1);&#xD;
}&#xD;
&amp;lt;ul&amp;gt;&#xD;
    @foreach (var page in root.Children.Where("Visible"))&#xD;
    { &#xD;
        &amp;lt;li class="@page.IsAncestorOrSelf(Model, "current", "")"&amp;gt;&#xD;
            &amp;lt;a href="@page.Url"&amp;gt;@page.Name&amp;lt;/a&amp;gt;&#xD;
        &amp;lt;/li&amp;gt;&#xD;
    }&#xD;
&amp;lt;/ul&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;The “&lt;a href="http://our.umbraco.org/wiki/reference/code-snippets/razor-snippets" target="_blank"&gt;Razor snippets&lt;/a&gt;”-article from our.umbraco.org contains a lot of great tips and tricks and also the &lt;a href="http://our.umbraco.org/projects/developer-tools/razor-dynamicnode-cheat-sheet" target="_blank"&gt;Razor Cheat Sheet&lt;/a&gt; is good to have!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;new headline&lt;/p&gt;&#xD;
&lt;p&gt;asdasdasd&lt;/p&gt;</description>
      <pubDate>Tue, 22 Jan 2013 14:17:00 Z</pubDate>
      <a10:updated>2013-01-22T14:17:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">4cbc2e25-272e-42b4-a02f-8fbb7bb8d6b2</guid>
      <link>https://www.enkelmedia.se/blogg/2013/1/20/great-reading-about-umbraco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Great reading about Umbraco</title>
      <description>&lt;p&gt;Last week i discovered a great resource for information about &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt;. It's a christmas calendar that contains 24 blog posts about Umbraco and how to use it. I would like to present some of my favorite posts here.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Focus on the editors&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;The editors are the people who will use the system the most. Thats why I love these posts about how to make Umbraco easier to use for our editors:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://24days.in/umbraco/2012/remember-the-editors/" target="_blank"&gt;http://24days.in/umbraco/2012/remember-the-editors/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://24days.in/umbraco/2012/superhero/" target="_blank"&gt;http://24days.in/umbraco/2012/superhero/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Developers goodies&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Another great topic is speed. I see far to many pages that are slow because the developers don´t implemented a good cache-strategy - I love the quote "not running code is the fastes way to improve you applications speed".&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://24days.in/umbraco/2012/optimise-for-speed/" target="_blank"&gt;http://24days.in/umbraco/2012/optimise-for-speed/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Matt Brailsford shows a very simple way to implement paging using Umbraco:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://24days.in/umbraco/2012/ajax-paging-using-alttemplates/%20simple%20paging" target="_blank"&gt;http://24days.in/umbraco/2012/ajax-paging-using-alttemplates/ simple paging&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The new Image control in Umbraco version 4.11 is described here:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://24days.in/umbraco/2012/introducing-the-umbraco-image-control/%20" target="_blank"&gt;http://24days.in/umbraco/2012/introducing-the-umbraco-image-control/ &lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;All the posts can be found here: &lt;a href="http://24days.in/umbraco/2012/one-more-thing/" target="_blank"&gt;http://24days.in/umbraco/2012/one-more-thing/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Tomorrow I'm getting on a plane to the south of Sweden and on tuesday I will attend the Umbraco course in Copenhagen! =D I'll try to write some blog posts during the week - I'm working on a post about the new data layer in Umbraco 6 based on the great micro orm &lt;a href="http://www.toptensoftware.com/petapoco/" target="_blank"&gt;PetaPoco&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sun, 20 Jan 2013 22:45:00 Z</pubDate>
      <a10:updated>2013-01-20T22:45:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">3b8e4928-eee1-4016-8530-4846845ab3e7</guid>
      <link>https://www.enkelmedia.se/blogg/2012/12/17/great-inspiration-for-a-monday?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Great inspiration for a monday</title>
      <description>&lt;p&gt;Today I found this great infographics from &lt;a href="http://www.behance.net/gallery/29-Ways-to-Stay-Creative-Infographic/4504625" target="_blank"&gt;Islam Abudaoud&lt;/a&gt; on how to stay creative!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/12270/infographics-29-ways-to-stay-creative.jpg" alt="Infographics -29-ways -to -stay -creative"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 17 Dec 2012 14:06:00 Z</pubDate>
      <a10:updated>2012-12-17T14:06:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e07c4626-12d9-40a2-a84a-845f68e6fcf0</guid>
      <link>https://www.enkelmedia.se/blogg/2012/11/7/debugging-with-umbraco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Debugging with Umbraco</title>
      <description>&lt;p&gt;Today I wanted to take a moment and share some experience when it comes to debugging an &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; app. There is basicly three things I use the most&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;1. &lt;a href="#first"&gt;Process debugging with Visual Studio&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;2. &lt;a href="#sec"&gt;The Umbraco Log&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;3. &lt;a href="#three"&gt;The magic query strings&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a name="first"&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;1. Process debugging with Visual Studio&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;I usually have all my macros and custom user controls inside a Visual Studio project and use IIS as the web server. To debug, just go to the Tools menu and click "Attach to process". In the list choose "w3wp.exe" and Visual Studio will debug the app. You can set breakpoints, step over code and so on. If there is an exception in the code this will be shown in Visual Studio as well.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12148/WindowsLiveWriter_DebuggingwithUmbraco_6FE8_attach-to-process_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/12153/WindowsLiveWriter_DebuggingwithUmbraco_6FE8_attach-to-process_thumb.png" width="564" height="380" alt="attach-to-process" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;&lt;a name="sec"&gt;&lt;/a&gt;2. The Umbraco Log&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;The log table in the database is a goldmine when it comes to debugging! Almost all exceptions that are thrown will show in this table. If you are having problems with macros, a package or something that runs "inside" Umbraco looking in this table will probably help you.&lt;br /&gt;&lt;br /&gt;There is also a great tool called "F.A.L.M. Housekeeping" that can help you to view this table without having to dig into the db.&lt;br /&gt;&lt;br /&gt;The package can be found here: &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping" target="_blank" title="http://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping"&gt;http://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;a name="three"&gt;&lt;/a&gt;3. The magic query strings&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;If you are running your site in debug mode, you can add a “magic query string” to the url to show debug information inside the rendered page.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12158/WindowsLiveWriter_DebuggingwithUmbraco_6FE8_screen-referenser-debug_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/12163/WindowsLiveWriter_DebuggingwithUmbraco_6FE8_screen-referenser-debug_thumb.jpg" width="564" height="459" alt="screen-referenser-debug" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;If you want to se all the macro containers just add ?umbDebug=true to the end of the url.&lt;br /&gt;/yada.aspx?umbDebug=true&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;And if you would like to se the trace information for the page, add ?umbDebugShowTrace=true.&lt;br /&gt;/yada.aspx?umbDebugShowTrace=true&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;One thing that is very important when putting the site into production is to disable the debug mode by setting the "umbracoDebugMode" to false in web.config.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/12168/WindowsLiveWriter_DebuggingwithUmbraco_6FE8_debug-webconfig_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/12173/WindowsLiveWriter_DebuggingwithUmbraco_6FE8_debug-webconfig_thumb.png" width="564" height="149" alt="debug-webconfig" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 07 Nov 2012 06:57:00 Z</pubDate>
      <a10:updated>2012-11-07T06:57:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">dbff3bb1-f2cf-439c-9415-04d0a501ba6d</guid>
      <link>https://www.enkelmedia.se/blogg/2012/10/3/newsletters-in-umbraco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Newsletters in Umbraco</title>
      <description>&lt;p&gt;Some years ago I worked on a project and needed an easy way to &lt;strong&gt;send newsletters from Umbraco&lt;/strong&gt;. I looked though all the packages at &lt;a href="http://our.umbraco.org" target="_blank"&gt;our.umbraco.org&lt;/a&gt; and my conclusion was simple: there are no good packages.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I had two options: Integrate with an external email service or build something. I saw this as an opportunity to actually contribute something and improve the experience for the end users of Umbraco. Because at the end of the day it's always the end users, our customers, that are supposed to use the system.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;To make their life easier I wanted to create a newsletter section in the Umbraco backoffice where the user can create, send and track  newsletters. That's want I did.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Newsletter Studio for Umbraco&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;After a lot of hard work I managed to release &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/newsletter-studio" target="_blank"&gt;Newsletter Studio for Umbraco&lt;/a&gt; which is a extentions that let's your users send newsletters and track them from the same environment as they are used to work - the back office.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/12094/634621585884034000_newsletter-studio-edit-newsletter.jpg" alt="newsletter studio screenshot"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The feature list is quite long&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Send newsletters to members or subscribers from the Umbraco back office&lt;/li&gt;&#xD;
&lt;li&gt;Unlimited number of subscribers and newsletters in full version&lt;/li&gt;&#xD;
&lt;li&gt;Easy to create content using the same rich text editor as Umbraco&lt;/li&gt;&#xD;
&lt;li&gt;Can include dynamic content from Umbraco content nodes&lt;/li&gt;&#xD;
&lt;li&gt;Nice analytics and charts on opens and clicks&lt;/li&gt;&#xD;
&lt;li&gt;Built in support for skins and templates to control appearance&lt;/li&gt;&#xD;
&lt;li&gt;Handles bounces and lets you edit bounced subscribers&lt;/li&gt;&#xD;
&lt;li&gt;Import subscribers from different file formats.&lt;/li&gt;&#xD;
&lt;li&gt;Ships with Razor-templates to integrate into the website front end&lt;/li&gt;&#xD;
&lt;li&gt;Supports multiple smtp-servers and throttling&lt;/li&gt;&#xD;
&lt;li&gt;Hooks to extend the newsletter rendering process&lt;/li&gt;&#xD;
&lt;li&gt;Provider based model for receiving subscribers (can use sources like web shops, etc)&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Hook into Umbraco&lt;/h4&gt;&#xD;
&lt;p&gt;One of the best features with the package is the ability to hook into external subscriber sources. You can use the umbraco site members or write a provider that talks to your custom data source, a web shop package, web service or what ever.&lt;br /&gt;&lt;br /&gt;This can be used to for example send newsletters to all subscribers that did not place an order the last 3 months or people that have not logged in to your community site the last months.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;But, Umbraco is a CMS - not a newsletter email service?&lt;/h4&gt;&#xD;
&lt;p&gt;Some would say that you should not use Umbraco as a newsletter platform. I'll say it's just a matter of having the right infrastructure. There's a lot of benefits with having a integrated solution:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;No need for the end user to learn another system&lt;/li&gt;&#xD;
&lt;li&gt;Use and integrate content from the site in the newsletter&lt;/li&gt;&#xD;
&lt;li&gt;Using the "RenderTask" you can personalize the newsletters for each receiver&lt;/li&gt;&#xD;
&lt;li&gt;No need to export/import lists of subscribers. Just use the buildt in or write a custom provider that talks with your storage - it will always be up to date.&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;When you install Newsletter Studio you'll have to configure an outgoing sever. At the moment we only support smtp-servers so that means that you can use your hosting providers email server, your own or use a smtp-relay service like SendGrid or MailGun. This will work very good for the most scenarios, it's been tested with around 100k emails and works like a charm.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The aim for the next release is to make it possible to integrate to external APIs, like MailChimp and Campaign monitor. The end users will not see the differens - they will still use the umbraco backoffice but the package will run on a very robust infrastructure.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Want to try it? Go to: &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/newsletter-studio" target="_blank"&gt;http://our.umbraco.org/projects/backoffice-extensions/newsletter-studio&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;What do you think about the package? Feedback? Ideas? Just drop a comment!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Wed, 03 Oct 2012 04:40:00 Z</pubDate>
      <a10:updated>2012-10-03T04:40:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">003c8a3a-6c83-465f-94fe-bf4096482de8</guid>
      <link>https://www.enkelmedia.se/blogg/2012/9/17/it-s-official-my-pull-request-was-approved?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>It's official, my pull request was approved</title>
      <description>&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/11713/WindowsLiveWriter_Itsofficialmypullrequestwasapproved_E79D_image_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/11718/WindowsLiveWriter_Itsofficialmypullrequestwasapproved_E79D_image_thumb.png" width="529" height="246" alt="image" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Today I was celebrating with champagne at my office (not really but it sounds good), I have finally contributed my first lines of code to the Umbraco Core! =D&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I fixed a small issue with the MetaWeblog API which makes it possible to create content from programs like Windows live writer, Word, Blogger and so on.&lt;/p&gt;&#xD;
&lt;p&gt;Issue: &lt;a href="http://issues.umbraco.org/issue/U4-840"&gt;http://issues.umbraco.org/issue/U4-840&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Changeset: &lt;a href="http://umbraco.codeplex.com/SourceControl/network/forks/enkelmedia/umbracoMetaApiUrl/changeset/9f87c0f1fb30" title="http://umbraco.codeplex.com/SourceControl/network/forks/enkelmedia/umbracoMetaApiUrl/changeset/9f87c0f1fb30"&gt;http://umbraco.codeplex.com/SourceControl/network/forks/enkelmedia/umbracoMetaApiUrl/changeset/9f87c0f1fb30&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;h4&gt;How did i do it?&lt;/h4&gt;&#xD;
&lt;p&gt;I was surprised by that fact that it was quite easy to contribute and I would like to describe how I did.&lt;br /&gt;&lt;br /&gt;1. I read though the articles about how to contribute found at &lt;a href="http://our.umbraco.org/contribute" title="http://our.umbraco.org/contribute"&gt;our.umbraco.org/contribute&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;2. Created an account on &lt;a href="https://www.codeplex.com/site/register?associate=None" target="_blank"&gt;codeplex.com&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;3. Installed &lt;a href="http://tortoisehg.bitbucket.org/" target="_blank"&gt;TortoiseHg&lt;/a&gt; as my Mercurial client to work the Umbraco repository. (and read this &lt;a href="http://blogs.msdn.com/b/codeplex/archive/2010/01/22/using-mercurial-on-codeplex.aspx" target="_blank"&gt;small tutorial&lt;/a&gt; on how to use it)&lt;/p&gt;&#xD;
&lt;p&gt;4. Created my own &lt;a href="http://codeplex.codeplex.com/wikipage?title=Forks" target="_blank"&gt;fork&lt;/a&gt; of the Umbraco repository on Codeplex (may not be needed, read last part of &lt;a href="http://our.umbraco.org/contribute/working-with-the-umbraco-source" target="_blank"&gt;this page&lt;/a&gt;: Fork is taking to…)&lt;/p&gt;&#xD;
&lt;p&gt;5. Cloned my new fork to my local computer&lt;/p&gt;&#xD;
&lt;p&gt;6. Performed my changed to the code and made a commit.&lt;/p&gt;&#xD;
&lt;p&gt;7. Pushed the commit to my fork on Codeplex and created a &lt;a href="http://codeplex.codeplex.com/wikipage?title=Forks" target="_blank"&gt;pull request&lt;/a&gt; to the official Umbraco project.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;So if you find annoying this and bugs in Umbraco, at least &lt;a href="http://issues.umbraco.org/" target="_blank"&gt;report them&lt;/a&gt;! If you have the time an knowledge, clone the repository and fix them. I got some great feedback from &lt;a href="http://cultiv.nl/blog/" target="_blank"&gt;Sebastiaan Janssena&lt;/a&gt; and really learned some new stuff on the way!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;All the best!&lt;/p&gt;</description>
      <pubDate>Mon, 17 Sep 2012 14:28:00 Z</pubDate>
      <a10:updated>2012-09-17T14:28:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">7807dbb8-d9e2-4eb3-a59c-0bb25ccb0bf4</guid>
      <link>https://www.enkelmedia.se/blogg/2012/9/11/changes-to-metaweblog-api-first-contribution-to-the-umbraco-core?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Changes to MetaWeblog API - first contribution to the Umbraco core?</title>
      <description>&lt;p&gt;Today I was playing with my our public website, &lt;a href="https://www.enkelmedia.se/" target="_blank"&gt;enkelmedia.se&lt;/a&gt;, where I host this blog. It’s built with Umbraco, some custom document types and some event handlers that takes care of the sorting and stuff.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/11521/WindowsLiveWriter_ChangestoMetaWeblogAPIfirstcontributiont_12841_image_2.png"&gt;&lt;img src="https://www.enkelmedia.se/media/11526/WindowsLiveWriter_ChangestoMetaWeblogAPIfirstcontributiont_12841_image_thumb.png" width="289" height="256" alt="image" border="0" style="display: inline; margin-left: 0px; margin-right: 0px; border-width: 0px;"/&gt;&lt;/a&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;One of the features that I’ve been playing with is the &lt;a href="http://www.mayflymedia.co.uk/blog/updating-content-on-the-fly-with-metaweblog-api/" target="_blank"&gt;MetaWeblog API&lt;/a&gt; which makes it possible to post content to Umbraco using almost any device. You can use Windows Live Writer (like I’m doing right now), an &lt;a href="http://itunes.apple.com/se/app/blogger/id459407288?mt=8" target="_blank"&gt;iPhone app&lt;/a&gt; or any other software that supports the MetaWeblog API.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Some stuff did not work&lt;/h4&gt;&#xD;
&lt;p&gt;&lt;br /&gt;What I found was that the implementation in Umbraco sometimes lacks in it’s handling of exceptions. I.e. clicking yes in this dialog made my blog root node disappear and I hade to consult &lt;a href="http://amdonnelly.blogspot.se/2011/04/umbraco-missing-node-in-content-tree.html" target="_blank"&gt;this post&lt;/a&gt; by Alan Donnelly to solve it. I removed the last entries in cmsContentVersion and republished the node using the direct url /umbraco/editContent.aspx?id=yada.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/11531/WindowsLiveWriter_ChangestoMetaWeblogAPIfirstcontributiont_12841_Untitled-2_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/11536/WindowsLiveWriter_ChangestoMetaWeblogAPIfirstcontributiont_12841_Untitled-2_thumb.jpg" width="434" height="400" alt="Untitled-2" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Even more annoying&lt;/h4&gt;&#xD;
&lt;p&gt;Was the fact that the Umbraco implementation of MetaWeblog API returns your sites url whithout scheme or ports:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;yadadomain.com/blog.aspx&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Window Live Writer expects something like this:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;http://www.yadadomain.com/blog.aspx&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;And the crazy party is that there is no way to change it in the Windows Live Writer UI, the textbox is disabled:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="https://www.enkelmedia.se/media/11541/WindowsLiveWriter_ChangestoMetaWeblogAPIfirstcontributiont_12841_Untitled-3_2.jpg"&gt;&lt;img src="https://www.enkelmedia.se/media/11546/WindowsLiveWriter_ChangestoMetaWeblogAPIfirstcontributiont_12841_Untitled-3_thumb.jpg" width="434" height="402" alt="Untitled-3" border="0" style="display: inline; border: 0px;"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;The only way is to open “regedit” and look for this key: HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer\Weblogs\ where you can change the settings of Live Writer.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Contribution to the core?&lt;/h4&gt;&#xD;
&lt;p&gt;We’ll to be honest, until now I haven’t really taking the time to clone the repository from CodePlex before, I’ve played around with the source and used is as a reference and for documentation – but never really change any thing.&lt;/p&gt;&#xD;
&lt;p&gt;But today I read though the &lt;a href="http://our.umbraco.org/contribute" target="_blank"&gt;instructions on how to contribute&lt;/a&gt; and actually performed my first pull request!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://umbraco.codeplex.com/SourceControl/network/forks/enkelmedia/umbracoMetaApiUrl/contribution/3372" target="_blank" title="http://umbraco.codeplex.com/SourceControl/network/forks/enkelmedia/umbracoMetaApiUrl/contribution/3372"&gt;http://umbraco.codeplex.com/SourceControl/network/forks/enkelmedia/umbracoMetaApiUrl/contribution/3372&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 11 Sep 2012 19:05:00 Z</pubDate>
      <a10:updated>2012-09-11T19:05:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">14051be2-93d0-4c1d-8cb5-fcbffa308efc</guid>
      <link>https://www.enkelmedia.se/blogg/2012/9/1/umbraco-och-client-dependency-framework?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco och Client Dependency Framework</title>
      <description>&lt;p&gt;Hej!&lt;/p&gt;
&lt;p&gt;I fortsättningen kommer jag skriva en och annan bloggpost på engelska för att göra informationen tillgänglig för dem som inte haft förmånen att lära sig vårt fina språk =D&lt;br /&gt;So this will be my first blog post in English, and I'm going to try to explain how to use the &lt;a rel="noopener" href="http://clientdependency.codeplex.com/" target="_blank"&gt;Client Dependency Framework&lt;/a&gt; with Umbraco CMS.&lt;/p&gt;
&lt;h4&gt;Client what?&lt;/h4&gt;
&lt;p&gt;First of all, the Client Dependency framework helps you to include, combine and compress javascript and CSS-files used on the website. It is not Umbraco-specific but this post will focus on how to use it in Umbraco.&lt;/p&gt;
&lt;h4&gt;Why?&lt;/h4&gt;
&lt;p&gt;There are a couple of good reason to use this framework.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Compressing and combining resource files reduces load time.&lt;/li&gt;
&lt;li&gt;UserControls och Razor macros can insert dependent files in the head-tag without any fancy pluming.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This picture shows &lt;a rel="noopener" href="https://www.enkelmedia.se/our.umbraco.org" target="_blank"&gt;our.umbraco.org&lt;/a&gt;, they are using the Client Dependency Framework, but haven't activated it. Becuse of this the browser has to download around 20 different css and javascript files.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/11360/clientdependency-not-in-place.png" alt="Clientdependency -not -in -place" width="490" height="381" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;How?&lt;/h4&gt;
&lt;p&gt;Umbraco ships with the Client Dependency framework and there is not much that you need to set up. If you want to use the framework in a user control, just add a reference to it.&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;%@ Register Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" TagPrefix="cd" %&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Or, as I perfer, just add the reference to the web.config file. Since the framework will be used in a lot o places, it's much cleaner to keep the reference in web.config   &lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;/pages&amp;gt;
   &amp;lt;/controls&amp;gt;
      ...
      &amp;lt;add tagPrefix="cd" namespace="ClientDependency.Core.Controls" assembly="ClientDependency.Core" /&amp;gt;
   &amp;lt;/controls&amp;gt;
&amp;lt;/pages&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;When the reference is in place, we need to add a ClientDependencyLoader-control at the place where we want to include the CSS and JavaScript-files. Just add this line of code somewhere in the head-tag of you master-template.&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;cd:ClientDependencyLoader runat="server" id="Loader" /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;To include resources you just need to use these two lines.&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;!-- Using web forms --&amp;gt;
&amp;lt;cd:CssInclude FilePath="~/css/style-120830.css" Priority="0" runat="server"  /&amp;gt;
&amp;lt;cd:JsInclude FilePath="~/scripts/jquery-1.3.1.min.js" Priority="0" runat="server" /&amp;gt;

&amp;lt;!-- Using razor --&amp;gt;
@Html.RequiresCss("ColorScheme.css", "Styles").RequiresJs("/Js/jquery-1.3.2.min.js");&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;You can add resources directly in the templates or in custom user controls or razor macros, it's even possible to add them in code using attributes.&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: csharp"&gt;// CSS
[ClientDependency(ClientDependencyType.Css, "~/css/style.css")] 

// JavaScript
[ClientDependency(ClientDependencyType.Javascript, "~/scripts/util.js")]&lt;/pre&gt;
&lt;/div&gt;
&lt;h4&gt;&lt;br /&gt;Priority&lt;/h4&gt;
&lt;p&gt;Can be used when you need one file to load before another, ie. if you are using jQuery it needs to load before any plug-ins. A lower priority means it will be render before higher values.&lt;/p&gt;
&lt;h4&gt;Compression and combination&lt;/h4&gt;
&lt;p&gt;It's &lt;strong&gt;important to notice&lt;/strong&gt; that Client Dependency Framework will not combine or compress files unless the compilation debug is set to false.&lt;/p&gt;
&lt;div id="CodeDiv"&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0"&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Another thing that took me a while to get my head around was &lt;strong&gt;how to reset the cache&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change the version number in the ClientDependency config (/conifg/ ClientDependency.config)&lt;/li&gt;
&lt;li&gt;Remove the ClientDependency folder from App_Data &lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;img src="https://www.enkelmedia.se/media/11355/clientdependency-reset-cache.png" alt="Clientdependency -reset -cache" width="490" height="272" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;More reading&lt;/h4&gt;
&lt;p&gt;&lt;a rel="noopener" href="http://clientdependency.codeplex.com/documentation" target="_blank"&gt;http://clientdependency.codeplex.com/documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener" href="http://our.umbraco.org/wiki/reference/templates/adding-css-and-javascript-using-the-clientdependency" target="_blank"&gt;http://our.umbraco.org/wiki/reference/templates/adding-css-and-javascript-using-the-clientdependency&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 01 Sep 2012 14:13:00 Z</pubDate>
      <a10:updated>2012-09-01T14:13:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">a80f8d44-3c16-47c6-a141-f49bebf6f823</guid>
      <link>https://www.enkelmedia.se/blogg/2012/8/30/gjorde-en-plugin-jqueryajaxdialog?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Gjorde en plugin - jQueryAjaxDialog</title>
      <description>&lt;p&gt;Har precis lagt till en kundarea för de av våra kunder som köper hosting-tjänster. Där kan de själva lägga till och tabort e-postadresser och forwards. För att gränssnittet skulle bli väldigt lättarbetat så valde jag att arbeta mycket med ajax och jQuery. Så pass mycket att jag byggde en plugin.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/11336/enkelmedia-kundarea.png" width="490" height="276" alt="Enkelmedia -kundarea"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Saken är den att jag upptäckte att jag ofta ville göra saker som hade det här flödet:&lt;br /&gt;&lt;br /&gt;Visa en dialogruta med formulär ----&amp;gt; Skicka en formuläret med ajax ----&amp;gt; Visa svar från server&lt;br /&gt;&lt;br /&gt;Exempel på saker som skulle göras:&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Visa dialogruta för att lägga till ny adress&lt;/li&gt;&#xD;
&lt;li&gt;Visa diaglogruta för att ändra lösenord&lt;/li&gt;&#xD;
&lt;li&gt;Visa dialogruta för att bekräfta borttagning&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Alla dessa följer samma mönster, så jag insåg att jag borde jag göra en jQuery plugin istället för att skriva samma infrastrukturkod flera gånger (DRY - Don't repeat yourself).&lt;br /&gt;&lt;br /&gt;Resultatet har jag lagt upp på github: &lt;a href="https://github.com/enkelmedia/jQueryAjaxDialog"&gt;https://github.com/enkelmedia/jQueryAjaxDialog&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;En enkel och anpassningsbar plugin som visar dialogrutan och hanterar allt med postning av själva formuläret. Allt man behöver göra är att returnera ett JSON-objekt som innehåller egenskaperna "message" (string) och "success" (bool) så sköter min plugin resten.&lt;/p&gt;</description>
      <pubDate>Thu, 30 Aug 2012 16:29:00 Z</pubDate>
      <a10:updated>2012-08-30T16:29:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">22bb5131-f928-41af-8c9c-ff7a64294afc</guid>
      <link>https://www.enkelmedia.se/blogg/2012/8/22/umbracos-media-picker?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbracos media picker</title>
      <description>&lt;p&gt;Jag har precis börjat arbeta med en kund som har väldigt mycket bilder i sin media section, det är ganska få mappar med väldigt många filer i varje mapp. Bilderna används på olika artiklar i content trädet och väljs med umbracos inbyggda media picker.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10988/media-picker-simple.png" width="335" height="411" alt="Media -picker -simple"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Problemet med denna picker är att man endast kan välja bild, vilket gjorde att min kund tidigare var tvungen att först gå in i media-sektionen och ladda upp bilder för att sedan gå till artikeln och välja den nya bilden (och leta som en galning ibland alla filer).&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag tittade på olika lösningar på problemet en av dem skulle vara att installera &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker" target="_blank"&gt;DAMP&lt;/a&gt;-paketet som är en riktigt bra media picker, men efter ett tips från &lt;a href="https://twitter.com/Brannmark" target="_blank"&gt;@Brannmark&lt;/a&gt; insåg jag att lösningen kan vara betydligt enklare än så. Det går nämligen att sätta umbracos inbyggda media picker i "advanced mode".&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10993/media-picker-changedatatype.png" width="692" height="439" alt="Media -picker -changedatatype"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Gör så här:&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;1. Gå till developer-sektionen och välj "Media Picker" i listan över Data Types.&lt;br /&gt;2. Klicka i "Show preview" och "Show advanced dialog".&lt;/p&gt;&#xD;
&lt;p&gt;2.2 Om du vill att vissa ställen har den "enkla" media pickern kan du bara skapa en ny Data Type av typen Media Picker och då ha två media pickers i listan. Högerklicka bara på "Data Types"-mappen och klicka på add.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Det här blir resultatet&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10998/media-picker-advance.png" width="539" height="575" alt="Media -picker -advance"/&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 22 Aug 2012 04:38:00 Z</pubDate>
      <a10:updated>2012-08-22T04:38:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">a7ff987e-ba65-4b13-a005-2f5afd2afc50</guid>
      <link>https://www.enkelmedia.se/blogg/2012/8/7/kolla-http-headers?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Kolla http headers</title>
      <description>&lt;p&gt;Idag var jag på jakt efter ett bra verktyg för att snabt kolla http-headers, självklart hade &lt;a href="http://www.fiddler2.com/fiddler2/" target="_blank"&gt;Fiddler&lt;/a&gt; varit ett perfekt alternativ men datorn jag satt på hade det inte installerat och jag orkade inte krångla med it-folket.&lt;br /&gt;&lt;br /&gt;Därför hittade jag det här simpla verktyget: &lt;a href="http://tools.seobook.com/server-header-checker/" target="_blank"&gt;http://tools.seobook.com/server-header-checker/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Hur smidigt som helst!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10967/seobook.jpg" width="490" height="347" alt="Seobook"/&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 07 Aug 2012 04:22:00 Z</pubDate>
      <a10:updated>2012-08-07T04:22:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">051a469b-6f16-4579-a60e-7d0169cf6f62</guid>
      <link>https://www.enkelmedia.se/blogg/2012/8/6/lansering-for-pnp-rederi?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Lansering för PNP Rederi</title>
      <description>&lt;p&gt;Det var i mitten av april som jag fick kontakt med Patrik och Peter på PNP Rederi i Linköping. De behövde hjälp att skapa ett bokningssystem och en fräch hemsida för deras nystartade rederi. Bokningssystemet behövde lanseras redan i början/mitten av maj då deras resor på &lt;a href="http://www.pnprederi.se" target="_blank"&gt;Göta Kanal&lt;/a&gt; skulle dra igång.&lt;br /&gt;&lt;br /&gt;Nu har vi också lanserat deras nya publika webbsida, resultatet blev följande sida som är byggd i &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco CMS&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Layout: &lt;a href="http://danielberglund.se/" target="_blank"&gt;Daniel Berglund&lt;/a&gt;&lt;br /&gt;Projektledning/utveckling: Markus Johansson&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10920/pnp1.jpg" width="490" height="475" alt="Pnp1"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;em&gt;Startsidan med puffar och aktuella kryssningar&lt;/em&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10925/pnp2.jpg" width="490" height="475" alt="Pnp2"/&gt;&lt;br /&gt;&lt;em&gt;Bokningssidan med responsivt gränssnitt som direkt summerar priser osv. Byggt med KnockoutJS&lt;/em&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10930/pnp3.jpg" width="490" height="475" alt="Pnp3"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;em&gt;Karta till Berg med båtens färdväg utmarkerad&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 06 Aug 2012 16:48:00 Z</pubDate>
      <a10:updated>2012-08-06T16:48:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">c4c20543-98f7-44b7-8386-f7a3537f3169</guid>
      <link>https://www.enkelmedia.se/blogg/2012/8/3/bra-uml-verktyg?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Bra UML-verktyg</title>
      <description>&lt;p&gt;Jag har länge varit på jakt efter ett verktyg för att modellera system, skapa flödesdiagram, konceptuella modeller, användardiagram osv. Det har varit ett tufft jobb, jag är uppriktigt förvånad över hur dåliga och krångliga många av de program som jag har testar var - och ännu mer förvånad över vad som blev min slutsats. Ett av mina störta krav är att det ska producera snygga och stilrena diagram som man kan visa för kunden - tydligen inget enkelt krav att tillgodose.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Smartdraw&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10852/uml-smartdraw.jpg" width="490" height="391" alt="Uml -smartdraw"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Många på Stackoverflow rekommenderade verktyget Smartdraw (&lt;a href="http://www.smartdraw.com/" target="_blank"&gt;http://www.smartdraw.com/&lt;/a&gt;). Jag har testat det en aning, det är ett väldigt brett program som kan användas till i stort sätt allt. Jag tycker dock att de missat några fundamentala saker som att själv kunna skapa och spara formateringar, om jag till exempel vill ha en tonad bakgrund till ljusblå så måste jag klicka ca 6 gånger per objekt för att åstadkomma detta, för att inte tala om när man associerar objekt och programmet helt plötsligt tappar kontrollen på dessa och vissa objekt bara försvinner från arbetsytan. &lt;br /&gt;&lt;strong&gt;Min slutsats&lt;/strong&gt;: För ostabilt och för krångligt att skapa egna stilmallar.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Microsoft Visio&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10857/uml-visio.jpg" width="490" height="371" alt="Uml -visio"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Enligt vad jag har förstått så är detta projektledarens bästa vän, men jag tycker ändå att Visio är krångligt. Diagrammen blir fulare än med Smartdraw, det är nästan lika krångligt att styla dem men på plussidan kan man ändå sätta att associationerna funkar bättre och objekten försvinner inte helt plötsligt.&lt;br /&gt;&lt;strong&gt;Min slutsats&lt;/strong&gt;: Stabilare än Smartdraw, men fulare diagram&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Gliffy (online)&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10862/uml-gliffy.jpg" width="490" height="428" alt="Uml -gliffy"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;När jag googlade efter bra desktopprogram så fick jag upp denna sida där man kan skapa sina diagram online.  Jag tänkte först "inte en chans att det kan funka" men faktum är att Gliffy (&lt;a href="http://www.gliffy.com" target="_blank"&gt;http://www.gliffy.com&lt;/a&gt;) är den editor som jag gillar bäst. Ett enkelt klick för att ändra stilen på objekten, associationerna är enkla att koppla och allt ser supersnyggt ut. Om man ska via på nackdelar så har inte Gliffy lika många typer av diagram editorn är mest fokuserad på mjukvara och på webmockups - vilket passar mig perfekt. Jag kan också bjuda in mina kunder att arbeta med diagrammen direkt i webbläsaren vilket är lite sexigt. Ett konto kostar 5 dollar i månaden och just nu känns det helt klart värt det.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Min slutsats&lt;/strong&gt;: Jag jobbar med web och mjukvara - denna editor är optimerad för detta. Tackar.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Fri, 03 Aug 2012 06:41:00 Z</pubDate>
      <a10:updated>2012-08-03T06:41:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">bf9b39b9-e3ee-4b32-bddc-a6b9b625c737</guid>
      <link>https://www.enkelmedia.se/blogg/2012/6/17/summering-av-codegarden-2012?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Summering av CodeGarden 2012</title>
      <description>&lt;p class="p1"&gt;Det var en intressant konferens som började väldigt oväntat med att vi fick veta att man kommer &lt;a href="http://umbraco.com/follow-us/blog-archive/2012/6/13/cg12-keynote-video.aspx" target="_blank"&gt;sluta arbeta med Umbraco version 5&lt;/a&gt;, istället är det fullt fokus på version 4. Den ska göras bättre, byggas smartare och göras ännu mer flexibel.&lt;/p&gt;&#xD;
&lt;p class="p1"&gt; &lt;/p&gt;&#xD;
&lt;p class="p1"&gt;&lt;img src="https://www.enkelmedia.se/media/10798/codegarden2012-niels.jpg" width="490" height="305" alt="Codegarden 2012-niels"/&gt;&lt;/p&gt;&#xD;
&lt;p class="p1"&gt; &lt;/p&gt;&#xD;
&lt;p class="p1"&gt;En applikation är byggd i flera lager, själva "kärnan" i Umbraco 5 var helt enkelt för komplicerad, medan kärnan i Umbraco 4 är betydligt lättare att arbeta med. Presentationslagret (dvs det som användaren ser) renderas i V4 med webforms, i V5 var det &lt;a href="http://www.asp.net/mvc/tutorials/older-versions/overview/asp-net-mvc-overview" target="_blank"&gt;MVC&lt;/a&gt; som gällde. Många tror att MVC-satsningen dör i och med detta beslut, det tror inte jag. Det finns redan nu sätt att köra Umbraco 4 med MVC som presentationslager.&lt;/p&gt;&#xD;
&lt;p class="p2"&gt; &lt;/p&gt;&#xD;
&lt;p class="p1"&gt;Om man ska sammanfatta konferensen så är jag extremt nöjd med att ha varit där. Trots det smått chockartade beskedet dag ett så var stämningen verkligen på topp resterande dagar. Det var extremt roligt att träffa människorna bakom alla dessa "avatars" som man ser i &lt;a href="http://our.umbraco.org/" target="_blank"&gt;forumet&lt;/a&gt;.&lt;/p&gt;&#xD;
&lt;p class="p1"&gt; &lt;/p&gt;&#xD;
&lt;p class="p1"&gt;&lt;img src="https://www.enkelmedia.se/media/10803/codegarden2012-niels2.jpg" width="490" height="287" alt="Codegarden 2012-niels2"/&gt;&lt;/p&gt;&#xD;
&lt;p class="p2"&gt; &lt;/p&gt;&#xD;
&lt;p class="p1"&gt;Det var väldigt inriktat på kod och utveckling så den som endast använder Umbraco som redaktör skulle troligen varit ganska förvirrad, det skulle vara ännu roligare om både redaktörer och utvecklare var med på konferensen så att man kan hitta ännu bättre lösningar tillsammans.&lt;/p&gt;&#xD;
&lt;p class="p2"&gt; &lt;/p&gt;&#xD;
&lt;p class="p1"&gt;Några tankar som jag tar med mig från denna konferens&lt;/p&gt;&#xD;
&lt;p class="p1"&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Jag är inte korkad, Umbraco 5 var för svårt för de flesta.&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://cropup.codeplex.com/" target="_blank"&gt;CropUp&lt;/a&gt;-paketet som presenterades är klockrent. Cropping med en "tyngpunkt" som gör att viktiga delar av bilden inte skalas bort.&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="https://github.com/SignalR/SignalR" target="_blank"&gt;SignalR&lt;/a&gt; är extremt coolt&lt;/li&gt;&#xD;
&lt;li&gt;Umbraco-Bingo är något jag garanterat ska sno till mina framtida personalfester.&lt;/li&gt;&#xD;
&lt;li&gt;Jag måste lära mig git och github bättre&lt;/li&gt;&#xD;
&lt;li&gt;Umbraco-utvecklare gillar att dricka öl (vissa från Norrland dricker endast sprit)&lt;/li&gt;&#xD;
&lt;li&gt;Danskar räknar/säger siffor väldigt konstigt&lt;/li&gt;&#xD;
&lt;li&gt;Mitt paket Newsletter Studio ska kunna skicka mail via SMTP, APIer eller vad som helst. Det ska vara provider-baserat så att man kan implementera sin egen "utsändnings-taktik".&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p class="p2"&gt; &lt;/p&gt;&#xD;
&lt;p class="p2"&gt; &lt;/p&gt;</description>
      <pubDate>Sun, 17 Jun 2012 11:18:00 Z</pubDate>
      <a10:updated>2012-06-17T11:18:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">c0ba5e04-894b-4742-a653-5d3c8df71916</guid>
      <link>https://www.enkelmedia.se/blogg/2012/6/14/direkt-fran-codegarden-2012?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Direkt från CodeGarden 2012</title>
      <description>&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10767/img_1199.jpg" width="490" height="424" alt="IMG_1199"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Idag är det dag två av den årliga &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; -konferansen CodeGarden här i Köpenhamn. Jag kom hit igår eftermiddag och missade den omtalade &lt;a href="http://umbraco.com/follow-us/blog-archive/2012/6/13/v5-rip.aspx" target="_blank"&gt;keynoten&lt;/a&gt; då Niels Hartvig berättade att core-teamet och framstående medlemmar i Umbracos "community" kommit fram till att man ska avbryta arbetet med Umbraco 5. Det innebär i korthet att man kommer släppa version 5.2 för att sedan avbryta utvecklingen och istället fokusera på att förbättra version 4.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Det råder blandade känslor om detta beslut, det var relativt oväntat men antagligen ett klokt beslut. Många utvecklare upplevde &lt;strong&gt;Umbraco 5&lt;/strong&gt; som väldigt komplext och svårarbetat, det var få som tog steget fullt ut och satsade på plattformen. Man säger att det "är enklare förbättra Umbraco 4 än att förenkla Umbraco 5".&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Personligen har jag inte investerat onödigt mycket tid i nya plattformen, den tid jag lagt ned har ändå givit mig nya idéer och ny kunskap så jag är inte bitter. Däremot förstår jag frustrationen hos dem som lagt ned mycket tid på och arbetar med stora projekt på nya plattformen.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag höll min presentation om Newsletter Studio för Umbraco imorse, det gick fin fint! Jag tänkte bjuda på par bilder från gårdagen, först och främst core-teamets roadmap inför framtiden.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10772/road1.jpg" width="490" height="661" alt="Road1"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10777/road2.jpg" width="490" height="750" alt="Road2"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10782/road3.jpg" width="490" height="769" alt="Road3"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10787/road4.jpg" width="490" height="700" alt="Road4"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Ska vidare på nästa föreläsning men det kommer mera... &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 14 Jun 2012 12:14:00 Z</pubDate>
      <a10:updated>2012-06-14T12:14:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1ea72958-f617-4b93-81b9-ef68007392ef</guid>
      <link>https://www.enkelmedia.se/blogg/2012/5/18/session-pa-codegarden-2012?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Session på CodeGarden 2012</title>
      <description>&lt;p&gt;Jag är väldigt stolt (och nästan lite nervös) över det faktum att jag ska hålla i en kort session på årets stora Umbracoevent, &lt;a href="http://codegarden12.com/" target="_blank"&gt;Code Garden 2012&lt;/a&gt;, som hålls 13-15 juni i Köpenhamn.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10746/newsletterstudio.jpg" width="580" height="404" alt="Newsletterstudio"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag kommer att demonstrera Enkel Medias paket &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/newsletter-studio" target="_blank"&gt;Newsletter Studio&lt;/a&gt; som en del i en "&lt;a href="http://codegarden12.com/sessions/day-two/slot-one/lightning-deli-delights.aspx" target="_blank"&gt;Lighting session&lt;/a&gt;" som hålls dag två. För dig som aldrig hört om Newsletter Studio så är detta en "plugin" till Umbraco som gör det möjligt för redaktörer att skicka nyhetsbrev direkt via samma gränssnitt som man utför övriga uppgifter som är relaterade till hemsidan.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Du som ska till Köpenhamn på Code Garden borde ta kontakt med medlemmarna i &lt;a href="http://www.uugs.se" target="_blank"&gt;UUGS&lt;/a&gt; som kommer att träffas under konferensen.&lt;/p&gt;</description>
      <pubDate>Fri, 18 May 2012 04:03:00 Z</pubDate>
      <a10:updated>2012-05-18T04:03:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">5065f1ca-56a3-4208-b180-9d22bc754db9</guid>
      <link>https://www.enkelmedia.se/blogg/2012/5/15/vad-ar-nytt-i-umbraco-4-7-2?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Vad är nytt i Umbraco 4.7.2?</title>
      <description>&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10720/umbracomembers.png" width="188" height="163" alt="Umbracomembers" style="float: right;"/&gt;Det korta svaret är att det inte är några nyheter i Umbraco 4.7.2, störst fokus har enligt teamet legat på att stabilisera existerande funktioner och optimera prestandan, några av de saker som förbättrats är:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Medlemshanteringen har ändrats så att den lutar sig mer åt .NETs egen MembershipProvider, detta är endast interna ändringar som inte påverkar själva APIn.&lt;/li&gt;&#xD;
&lt;li&gt;Ökad prestanda och stabilitet i motorn för förhandsvisning.&lt;/li&gt;&#xD;
&lt;li&gt;Ny inställning för att hålla användare inloggade i backoffice finns i umbracoSettings.config, /settings/security/keepUserLoggedIn. Denna är satt till true, om man vill ha automatisk utloggning, sätt den till false.&lt;/li&gt;&#xD;
&lt;li&gt;Förbättringar och optimeringar av Razor implementationen.&lt;/li&gt;&#xD;
&lt;li&gt;Upp till 80% bättre prestanda för den som använder SQLCE.&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;h4&gt;&lt;br /&gt;Så uppgraderar du&lt;/h4&gt;&#xD;
&lt;p&gt;För att göra en uppgradering kopierar du helt enkelt in katalogerna /bin,/umbraco &amp;amp; /umbraco_client. Kom dock ihåg att vissa tredjepartspaket sparas i dessa mappar.&lt;br /&gt;&lt;br /&gt;Umbraco 4.7.2 laddas enklast ned på CodePlex: &lt;a href="http://umbraco.codeplex.com/releases/view/81011" target="_blank"&gt;http://umbraco.codeplex.com/releases/view/81011&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;h4&gt;Vill du slippa få upp meddelandet i backoffice?&lt;/h4&gt;&#xD;
&lt;p&gt;Det finns såklart tillfällen när man väljer att inte uppgradera och då kan jag rekommendera en inställning som gör att "påminnelsen" i backoffice inte hoppar fram varje gång man loggar in.&lt;br /&gt;&lt;br /&gt;Öppna web.config och gör följande inställning:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;add key="umbracoVersionCheckPeriod" value="0" /&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 15 May 2012 05:04:00 Z</pubDate>
      <a10:updated>2012-05-15T05:04:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">a49f96d5-7d50-4dbd-97ce-b9143d33cdfd</guid>
      <link>https://www.enkelmedia.se/blogg/2012/3/28/umbraco-och-umbracodebugmode?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco och umbracoDebugMode</title>
      <description>&lt;p&gt;Har tidigare skrivit ett blogginlägg om saker att tänka på när man sätter ut sin &lt;a href="https://www.enkelmedia.se/blogg/2011/8/26/umbraco-i-produktionsmiljo" title="Umbraco i produktionsmiljö"&gt;Umbraco-sajt i produktionsmiljö&lt;/a&gt;. Tyvärr är det för få som läst den bloggposten =D Jag ser flera riktigt stora implementationer av Umbraco som ligger ute på nätet med stora säkerhetshål, vidöppna för hackers att frossa i.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Det här inlägget tänkte jag ägna åt att berätta om debugging. När man utvecklar sin hemsida i &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; så kan man använda sig av olika typ av debugfunktionalitet, dessa features är endast avseda att användas vid utveckling, i produktion (dvs. när hemsidan ligger live på internet) så ska debugfunktionerna inaktiveras av två skäl:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Säkerhet&lt;/h4&gt;&#xD;
&lt;p&gt;Att ha debugfunktionerna aktiverade gör att en hacker kan använda "&lt;strong&gt;umbDebugShowTrace=true&lt;/strong&gt;" för att visa sidans trace information (se bild nedan), den bjuder på en hel del information om sajten, denne hacker kan också använda "&lt;strong&gt;umbDebug=true&lt;/strong&gt;" för att visa sidan struktur och vart alla makron är placerade.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Prestanda&lt;/h4&gt;&#xD;
&lt;p&gt;I debugläget så läger ASP.NET energi på att skapa debuginformation, att stänga av debugfunktionerna i produktionsmiljö ökar din sajts prestanda.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/10041/traceinfo_74065c55-e1cf-4ae1-81d0-4b5e6d407af5.jpg" width="619" height="480" alt="Traceinfo _74065c 55-e 1cf -4ae 1-81d 0-4b 5e 6d 407af5"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;em&gt;Användandet av umbDebugShowTrace från &lt;a href="http://www.richardsoeteman.net/" target="_blank"&gt;http://www.richardsoeteman.net&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Hur gör man då?&lt;/h4&gt;&#xD;
&lt;p&gt;Det är väldigt enkelt att inaktivera debugging i ASP.NET och Umbraco, två enkla inställningar i web.config:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;appSettings&amp;gt;&#xD;
    ....&#xD;
    &amp;lt;add key="umbracoDebugMode" value="false" /&amp;gt;&#xD;
&amp;lt;appSettings&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;och så den här:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0"&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Glöm inte det här nästa gång du lanserar en hemsida med Umbraco som grund!&lt;/p&gt;</description>
      <pubDate>Wed, 28 Mar 2012 05:36:00 Z</pubDate>
      <a10:updated>2012-03-28T05:36:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">90bab7de-3196-47d3-bf22-8f024fb1a329</guid>
      <link>https://www.enkelmedia.se/blogg/2012/3/26/xml-sitemap-fran-umbraco-cms?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>XML-sitemap från Umbraco CMS</title>
      <description>&lt;p&gt;Jag tänkte göra en liten serie med tips på bra paket till &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt;! Idag sätter vi igång med paket för att generera en XML-sitemap. Denna sitemap är till största delen till för sökmotorerna och hjälper dem att hitta till innehåll på din hemsida..&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/9971/seositemap-xml.jpg" alt="Seositemap -xml" width="500" height="370"&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;För att visa sökmotorerna att du har en sitemap bör du lägga till följande rad i din &lt;a rel="noopener" href="http://www.robotstxt.org/" target="_blank"&gt;robots.txt&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Sitemap: &lt;a rel="noopener" href="https://www.enkelmedia.se/sitemap.xml" target="_blank"&gt;/sitemap.xml&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Självklart måste du ändra domän och sökväg till den som innehåll just din sitemap. Ett annat sätt att lägga till sin sitemap är att använda &lt;a rel="noopener" href="https://www.google.com/webmasters/tools/home?hl=sv" target="_blank"&gt;Googles verktyg för webbansvariga&lt;/a&gt;. Där kan du också kontrollera så att din XML-sitemap är korrekt och inte innehåller några fel.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/9976/seositemap-google.jpg" alt="Seositemap -google" width="530" height="178"&gt;&lt;/p&gt;
&lt;p&gt;En sitemap är ett textdokument i XML-format, man kan enkelt skapa dem själv men ännu enklare är att göra det automatiskt. När det kommer till &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco&lt;/a&gt; så finns det ett &lt;a rel="noopener" href="http://our.umbraco.org/search?q=sitemap&amp;amp;content=project," target="_blank"&gt;bra gäng färdiga paket&lt;/a&gt;, jag tänkte tipsa om några av mina favoriter:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel="noopener" href="http://our.umbraco.org/projects/website-utilities/cultiv-search-engine-sitemap" target="_blank"&gt;Cultiv seach engine sitemap&lt;/a&gt;&lt;br&gt;Grymt paket från &lt;a rel="noopener" href="https://twitter.com/#!/cultiv" target="_blank"&gt;Sebastiaan Janssen&lt;/a&gt; som genererar en smidig sitemap, här kan du också ställa in olika parametrar som searchEngineSitemapChangeFreq och searchEngineSitemapPriority.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel="noopener" href="http://our.umbraco.org/projects/website-utilities/google-sitemap-for-umbraco-4-%28jespercom%29" target="_blank"&gt;Google Sitemap for Umbraco&lt;/a&gt;&lt;br&gt;Av danska &lt;a rel="noopener" href="https://twitter.com/#!/jesperordrup" target="_blank"&gt;Jesper Ordrup&lt;/a&gt;, ett superenkelt paket som genererar en sitemap.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 26 Mar 2012 06:22:00 Z</pubDate>
      <a10:updated>2012-03-26T06:22:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">3c218fee-ae23-4d2b-8f18-e6f26f8177c4</guid>
      <link>https://www.enkelmedia.se/blogg/2012/3/23/microformats?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Microformats</title>
      <description>&lt;p&gt;Idag har jag arbetat en hel del med att uppdatera denna sida, enkelmedia.se. Bland annat har vi byt ut kommentarsfunktionen i &lt;a href="https://www.enkelmedia.se/blogg" target="_blank" title="Blogg"&gt;Umbraco bloggen&lt;/a&gt; till att använda &lt;a href="http://disqus.com/" target="_blank"&gt;Disqus&lt;/a&gt; istället för &lt;a href="http://developers.facebook.com/docs/plugins/" target="_blank"&gt;Facebooks Social Plugins&lt;/a&gt;. Tanken är att det ska bli enklare att kommentera och interagera med sajten.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Samtidigt så gjorde vi också endel tillägg "under huven" och utökade vår användning av så kallade &lt;strong&gt;microformats&lt;/strong&gt;. Dessa är små taggar o koden som gör att maskiner (ofta sökmotorer) kan förstå vad som är vad på en hemsida, att bara skriva ut adressen förklarar inte för en maskin att det faktiskt är en adress. Vi ändrade bland annat mikroformats på vår &lt;a href="https://www.enkelmedia.se/kontakt" title="Kontakt"&gt;kontaktsida&lt;/a&gt;. Nu ser koden ut ungefär så här:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;div class="vcard"&amp;gt;&#xD;
   &amp;lt;p&amp;gt;&amp;lt;span class="tel"&amp;gt;08 - 53 33 27 26&amp;lt;/span&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#xD;
   &amp;lt;h4&amp;gt;Adress&amp;lt;/h4&amp;gt;&#xD;
   &amp;lt;p class="fn org"&amp;gt;Enkel Media Stockholm AB&amp;lt;/p&amp;gt;   &#xD;
   &amp;lt;div class="adr"&amp;gt;&#xD;
   &amp;lt;p class="street-address"&amp;gt;Västgötagatan 22&amp;lt;/p&amp;gt;&#xD;
      &amp;lt;p&amp;gt;&#xD;
         &amp;lt;span class="postal-code"&amp;gt;118 27&amp;lt;/span&amp;gt; &#xD;
         &amp;lt;span class="locality"&amp;gt;Stockholm&amp;lt;/span&amp;gt;&#xD;
      &amp;lt;/p&amp;gt;&#xD;
  &amp;lt;/div&amp;gt;&#xD;
&amp;lt;/div&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Där vi börjar med en div-tag som innehåller klassen "vcard" vilket talar som att här börjar ett &lt;a href="http://microformats.org/wiki/hcard" target="_blank"&gt;hCard&lt;/a&gt;. vcard blir till hCard? Fråga mig inte vem som kom på den logiska kopplingen. Sedan använder vi olika klass-värden för att tala om olika saker för den maskin som vill lära vårt microformat.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;&lt;strong&gt;tel &lt;/strong&gt;- Telefonnummer&lt;/li&gt;&#xD;
&lt;li&gt;&lt;strong&gt;fn org &lt;/strong&gt;- Talar om att det är en organisation och vad den heter. Om man vill ha personlig kontaktinfo skiv bara "fn".&lt;/li&gt;&#xD;
&lt;li&gt;&lt;strong&gt;adr &lt;/strong&gt;- Inleder en adress&lt;/li&gt;&#xD;
&lt;li&gt;&lt;strong&gt;street-address&lt;/strong&gt; - Gatuadress&lt;/li&gt;&#xD;
&lt;li&gt;&lt;strong&gt;postal-code&lt;/strong&gt; - Postnummer&lt;/li&gt;&#xD;
&lt;li&gt;&lt;strong&gt;locality &lt;/strong&gt;- Stad&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Det finns en massa intressant läsning om &lt;em&gt;microformats&lt;/em&gt; och &lt;a href="http://microformats.org/wiki/hcard" target="_blank"&gt;hCards&lt;/a&gt;, men även en smidig tjänst där du kan &lt;a href="http://microformats.org/code/hcard/creator" target="_blank"&gt;skapa ditt eget hCard&lt;/a&gt;. När du lagt upp ditt hCard kan du validara det med hjälp av &lt;a href="http://hcard.geekhood.net" target="_blank"&gt;Geekhood.net&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 23 Mar 2012 13:14:00 Z</pubDate>
      <a10:updated>2012-03-23T13:14:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">44b411e8-cdfa-4585-8cb9-0daa4564235d</guid>
      <link>https://www.enkelmedia.se/blogg/2012/3/19/sokmotoroptimering-mina-tips-och-tricks?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Sökmotoroptimering mina tips och tricks</title>
      <description>&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/8138/search-engine-marketing.jpg" width="331" height="338" alt="Search -Engine -Marketing"/&gt;&lt;br /&gt;&lt;br /&gt;Arbetet med &lt;a href="https://www.enkelmedia.se/vi-erbjuder/sokmotoroptimering" title="Sökmotoroptimering"&gt;sökmotoroptimering&lt;/a&gt; är tidskrävande och ibland kan det vara svårt att veta vad som funkar och vad som inte funkar. Jag skulle inte vilja kalla mig för expert på området (gillar inte att överdriva), men jag har i alla fall hyfsat koll.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;När det gäller SEO så kan man grovt dela in det i optimering "on site" och optimering "off site" där den sistnämnda fått större och större betydelse med åren. Ingen vet exakt vilken del som är viktigast, troligen är de lika viktiga, off site är extra viktigt om de ord du vill förknippas med är extra utsatta för konkurrens.&lt;/p&gt;&#xD;
&lt;h4&gt;&lt;br /&gt;On site&lt;/h4&gt;&#xD;
&lt;p&gt;Denna optimering är den där du som sajtägare har störst kontroll. Det handlar om allt från att koda hemsidan rätt till att framför allt skapa relevant och attraktivt innehåll, detta är något jag som &lt;a href="https://www.enkelmedia.se/vi-erbjuder/webbutveckling" title="Webbutveckling"&gt;webbutvecklare&lt;/a&gt; arbetar med dagligen.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Off site&lt;/h4&gt;&#xD;
&lt;p&gt;Att optimera off site handlar i stort om att skaffa inlänkar till hemsidan från andra sidor. Ju högre &lt;a href="http://sv.wikipedia.org/wiki/Pagerank" target="_blank"&gt;PageRank&lt;/a&gt; sajten som länkar har dessto mer värde ger länken i Google och andra sökmotorers ögon.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Bra verktyg och bloggar&lt;/h4&gt;&#xD;
&lt;p&gt;Jag tänkte dela med mig av lite länkar som jag ofta använder.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Leta efter lämpliga sökord med &lt;a href="https://adwords.google.com/o/Targeting/Explorer?__c=1000000000&amp;amp;__u=1000000000&amp;amp;ideaRequestType=KEYWORD_IDEAS" target="_blank"&gt;Google Keyword Tool&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;Testa placering i Google med denna sajt: &lt;a href="http://gserp.se/" target="_blank"&gt;http://gserp.se/&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;Läs Nikke Lindqvist blogg om &lt;a href="http://www.lindqvist.com/sokmotoroptimering/" target="_blank"&gt;sökmotoroptimering&lt;/a&gt;.&lt;/li&gt;&#xD;
&lt;li&gt;Läs den här artikeln, &lt;a href="http://www.seomoz.org/blog/99-ways-to-build-links-by-giving-stuff-away-and-improve-your-brand-too-14029" target="_blank"&gt;99 tips till att få inlänkar&lt;/a&gt;.&lt;/li&gt;&#xD;
&lt;li&gt;Surfa på sajten med sökmotorns ögon, använd &lt;a href="http://www.domaintools.com/seo-browser/" target="_blank"&gt;Seo Browser&lt;/a&gt;.&lt;/li&gt;&#xD;
&lt;li&gt;Pinga din blogg för gratis inläkar, använd &lt;a href="http://www.twingly.com/customers" target="_blank"&gt;Twingly&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.google.se/webmasters/" target="_blank" title="Googles verktyg för webbansvariga är smidigt"&gt;Google Verktyg för webbansvariga&lt;/a&gt; är alltid smitidigt&lt;/li&gt;&#xD;
&lt;li&gt;Se vilka som länkar till dig med &lt;a href="http://www.opensiteexplorer.org" target="_blank"&gt;Open Site Explorer&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;Använd webbyrån Pineberrys grymma &lt;a href="http://www.pineberry.com/analysverktyg/" target="_blank"&gt;analysverktyg&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;Eller &lt;a href="http://www.keyworddensity.com/search_engine_optimization/keyword_density.cgi" target="_blank"&gt;denna sida&lt;/a&gt; som ger mer exakt information om textinnehållet.&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 19 Mar 2012 07:05:00 Z</pubDate>
      <a10:updated>2012-03-19T07:05:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">b4170c68-28d0-45e8-903c-67510b1b0df9</guid>
      <link>https://www.enkelmedia.se/blogg/2012/3/8/5-iphone-appar-som-rockar?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>5 iPhone-appar som rockar</title>
      <description>&lt;p&gt;Det här är blogginlägget som jag önskar att någon skrev till mig för några år sedan när jag skaffade en iPhone. Det finns en miljard olika appar, de flesta är rent skräp, men här tänkte jag dela med mig av några appar som jag använder dagligen.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;1. iCatcher&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/8043/icatecher.jpg" width="320" height="480" alt="I Catecher" style="border: 3px solid #BABABA;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;För den som vill hålla sig uppdaterad om det senaste i utvecklingsvärlden så kan jag starkt rekommendera att lyssna på podcasts! Det är små radioprogram som man kan lyssna på när som helst man vill. Själv gör jag det ofta när jag ska promenera, eller om jag sitter i bilen! Mina favoriter är &lt;a href="http://www.dotnetrocks.com/" target="_blank"&gt;.NET rocks&lt;/a&gt; och &lt;a href="http://hanselminutes.com/" target="_blank"&gt;Hanselminutes&lt;/a&gt; som båda är amerikanska shower med inriktining på webb/.NET.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://itunes.apple.com/us/app/icatcher!-podcast-catcher/id414419105?mt=8" target="_blank"&gt;iCatcher på Itunes&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;2. Week Calendar&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/8048/week_calendar.jpg" width="320" height="480" alt="Week Calendar" style="border: 3px solid #BABABA;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Appen för den som gillar planering. Den har flera olika vyer för presenation av kalendern, vecka, månad, arbetsvecka osv osv. Min favorit är den ovan, den liknar orginalkalendern från iOS, men de små prickarna på varje datum indikerar hur många saker som är planerat denna dag - den lilla detaljen var lätt värd pengarna för att köpa appen.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://itunes.apple.com/se/app/week-calendar/id381059732?mt=8" target="_blank"&gt;Week Calendar på Itunes&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;3. MobileRSS&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/8053/mobilerss.jpg" width="320" height="480" alt="Mobile Rss" style="border: 3px solid #BABABA;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Att läsa bloggar är ett väldigt bra sätt att hålla sig uppdaterad, jag har själv har ett konto på &lt;a href="http://www.google.com/reader" target="_blank"&gt;Google Reader&lt;/a&gt;, som samlar alla mina favoritbloggar på ett ställe. Appen MobileRSS kan synca med Google Reader och ger ett riktigt snyggt sätt att läsa sina favoritbloggar på både iPhone och iPad. Rekommenderas starkt!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://itunes.apple.com/us/app/mobilerss-free-google-rss/id333925239?mt=8" target="_blank"&gt;MobileRSS på Itunes&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;4. Evernote&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/8058/evernote.jpg" width="320" height="480" alt="Evernote" style="border: 3px solid #BABABA;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.evernote.com" target="_blank"&gt;Evernote&lt;/a&gt; är en onlinetjänst som kan samla alla dina anteckningar, foton och ljudinspelningar från tex möten, brainstorms osv. Perfekt sätt att spara ned anteckningar, ta ett kort på en skisstavla osv. Allt samlas på ett och samma ställe. Det finns också en desktop-version av tjänsten (både PC och Mac) som syncar anteckningarna, du kan också använda tjänsten i browsern - dvs Evernote is all over the place!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://itunes.apple.com/se/app/evernote/id281796108?mt=8" target="_blank"&gt;Evernote på Itunes&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;5. Dropbox&lt;/h4&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/8063/dropbox.jpg" width="320" height="480" alt="Dropbox" style="border: 3px solid #BABABA;"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Lagringstjänsten &lt;a href="http://www.dropbox.com" target="_blank"&gt;Dropbox&lt;/a&gt; har verkligen blivit lika folklig som Melodifestivalen, här kan du enkelt lägga dina filer i "molnet" dvs. de sparas på nätet och du kan komma åt dem från både en browser, från sync-programmet och från dina mobila enheter. Det är också väldigt enkelt att dela filer med vänner och kollegor. Jag använder ofta Dropbox som ett snabbt sätt att föra över filer från telefonen till datorn om man inte har tillgång till sync-sladd.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://itunes.apple.com/se/app/dropbox/id327630330?mt=8" target="_blank"&gt;Dropbox på Itunes&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 08 Mar 2012 06:12:00 Z</pubDate>
      <a10:updated>2012-03-08T06:12:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">8a05235f-6e2c-4b71-b83e-9ea8a2cda42f</guid>
      <link>https://www.enkelmedia.se/blogg/2012/2/28/smidiga-vs-mallar-for-umbraco-5?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Smidiga VS-mallar för Umbraco 5</title>
      <description>&lt;p&gt;Det var ett tag sedan som Umbraco teamet släppte &lt;a href="http://umbraco.codeplex.com/" target="_blank"&gt;Umbraco V5&lt;/a&gt; i en RTM-version (Release To Manufacturing), dvs en variant som ska vara klar för att köras i produktionsmiljö.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag labbade lite med att bygga ut backoffice redan när V5 var i Beta och RC-stadiet och min upplevelse är att det är hyfsat krångligt samtidigt är vissa saker betydligt enklare. Tex att skapa egna sections eller "apps", egna träd och såvidare har faktiskt blivit enklare. Strukturen för alla extenstions är också tydligare, man pratar helt enkelt om Plugins. Det kan vara en plugin, eller flera plugins som bildar ett package. &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag kommer självklart att dela med mig mer av mina upplevelser av att bygga ut backoffice men kan börja med lite bra länkar, Shannon Deminicks blogg är ett måste för den som vill roa sig med plugins:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-1.aspx" target="_blank"&gt;http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-1.aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-2-Routing.aspx" target="_blank"&gt;http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-2-Routing.aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-3-Trees.aspx" target="_blank"&gt;http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-3-Trees.aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-4-Editors.aspx" target="_blank"&gt;http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-4-Editors.aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-5-Surface-Controllers.aspx" target="_blank"&gt;http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-5-Surface-Controllers.aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="~/media/7758/windows-live-writer_130b40ce828d_98fd_extensionmanager_449x260.jpg"  width="449"  height="260" alt="Windows -Live -Writer _130b 40ce 828d _98FD_Extension Manager"/&gt;&lt;br /&gt;&lt;br /&gt;Idagarna släppte också Morten Christensen ett gäng bra project-templates till Visual Studio för den som vill labba med egna plugins. Öppna Extenstion manager och sök på Umbraco så kommer de upp.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Tue, 28 Feb 2012 21:37:00 Z</pubDate>
      <a10:updated>2012-02-28T21:37:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">27406410-1ee5-4b98-8122-54a0b8cf5794</guid>
      <link>https://www.enkelmedia.se/blogg/2012/1/4/razor-i-umbraco-tips-och-tricks?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Razor i Umbraco, Tips och tricks</title>
      <description>&lt;p&gt;Som jag bloggat om tidigare så kommer &lt;a href="https://www.enkelmedia.se/" title="Umbraco"&gt;Umbraco&lt;/a&gt; att släpp stödet för XSLT i version 5, det blir istället fullt fokus på Razor!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;På sistone har jag bland annat roat mig med att kolla in Doug Robars &lt;a href="http://stream.umbraco.org/video/2198461/did-you-know" target="_blank"&gt;presentation från CodeGarden 2011&lt;/a&gt; där han pratar om tips och tricks för Umbraco. Jag har också kollat igenom Razor-avsnitten på &lt;a href="http://umbraco.com/help-and-support/video-tutorials/umbraco-fundamentals/razor.aspx" target="_blank"&gt;Umbraco TV&lt;/a&gt; – mest för att se om man kunde upptäcka något nytt. Jag antecknande lite smått och gott som jag tänkte bjuda på i detta (och kanske fler) inlägg.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Snabbvägen till Documents Types&lt;/h4&gt;&#xD;
&lt;p&gt;När du arbetar med ett razor macro och vill komma åt en eller flera child-elements som är av en viss Document Type så kan man använda följande syntax:&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@foreach(var node in Model.DocTypeNames) { }&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Det sades i någon presentation att man skulle lägga till ett “s” i slutet på namnet på den DocType man ville komma åt men det verkar som att det funkar även utan detta s, i alla fall i version 4.7.1. Låt oss säga att du har en “NewsItemFolder” under första noden i systemet och sedan i denna listar dokument av typen “NewItem”. Då skulle följade lista alla nyheter:&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@foreach(var node in Model.NewsItem.First().Children) {&#xD;
   @node.Name&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;h4&gt;&lt;br /&gt;Kapa och lägg till…&lt;/h4&gt;&#xD;
&lt;p&gt;Det händer ofta att man bara vill visa delar en sträng, kanske för en sammanfattning eller teaserlista. Det finns inbyggt i @Library.Truncate(). För att kunna använda detta måste du köra V4.7.1, alternativt uppgradera din macromotor genom att kopiera in “umbraco.MacroEngines.dll” från V4.7.1 till din V4.7.0-installation. Så här använder du metoden:&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@Library.Truncate("Här skriver vi en massa text som sedan ska kapas", &#xD;
10, true);&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Det som skrivs ut blir “Här skriver vi en massa t…”. Första parametern är indatan, sedan längden och om man vill att metoden lägger till “…” på slutet.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Om det är sant så gör det osv&lt;/h4&gt;&#xD;
&lt;p&gt;Att if-statments mitt i razorkoden ser ganska klumpigt ut så därför finns @Library.If() som används så här:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@Library.If(true=true, "Skrivs vid sant", &#xD;
"Skrivs vid falskt, denna är är inte obligatorisk.");&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Jag vill göra en breadcrumb&lt;/h4&gt;&#xD;
&lt;p&gt;Då ska du använda dig av metoden “Ancestors” som finns på alla DynamicNodes. Så här skriver du för att lista alla “parents” hela vägen upp till root-noden.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@foreach(var node in Model.Ancestors()) {&#xD;
  @node.Name&amp;lt;br/&amp;gt;&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Detta returnerar alltså alla parents i en fin lista så att man tex. kan göra en breadcrumb.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Gruppera mera&lt;/h4&gt;&#xD;
&lt;p&gt;En feature som jag verkligen gillar är InGroupsOf(intAntalPerGrupp). Denna kan anropas på alla typer av samlingar och kommer då att returnera objekt av typen “umbraco.MacroEngines.Grouping” som håller alla objekt i samlingen grupperade i grupper enligt parametern. Tex:&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;@foreach (var groups in Model.Children.InGroupsOf(2))    &#xD;
{&#xD;
  foreach (var item in groups)      &#xD;
  {              &#xD;
     &amp;lt;a href="@item.Url"&amp;gt;@item.Name&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&#xD;
  }&#xD;
  // Bryter efter två rader med en hr, hade också kunnat&#xD;
  // vara text en ny kolumn eller liknande.&#xD;
  &amp;lt;hr /&amp;gt;&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;  &lt;/p&gt;&#xD;
&lt;p&gt;Skulle skriva ut två childs, sedan en hr-tag, två childs, en tag osv osv.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Fuska lite&lt;/h4&gt;&#xD;
&lt;p&gt;Peter Gregory har skapat ett litet projekt på our.umbraco.org där han sammanställer en liten fusklapp över Umbraco och Razor, &lt;a href="http://our.umbraco.org/projects/developer-tools/razor-dynamicnode-cheat-sheet" target="_blank"&gt;Razor DynamicNode Cheat Sheet&lt;/a&gt; är klockrent, ladda hem idag!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/5290/umbraco_cheatsheet.png" width="450" height="338" alt="Umbraco _cheatsheet"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Nu orkar jag inte skriva mer! Tjejen ligger på soffan och vill att vi ska se på “Family guy”. Det finns mer Razor-tips att bjuda på så håll till godo, prenumerera gärna på min &lt;a href="https://www.enkelmedia.se/blogg/rss.aspx" target="_blank"&gt;RSS&lt;/a&gt; men hjälp av tex Outlook eller &lt;a href="http://www.google.com/reader" target="_blank"&gt;Google Reader&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 04 Jan 2012 18:18:00 Z</pubDate>
      <a10:updated>2012-01-04T18:18:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">92d1ce46-083e-4d71-9f4c-4a59cd8fac1a</guid>
      <link>https://www.enkelmedia.se/blogg/2011/12/23/umbraco-5-slapps-i-januari?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco 5 släpps i Januari</title>
      <description>&lt;p&gt;Idag togs ett nytt steg i arbetet med nya den versionen av Umbraco, Umbraco V5. Man släppte en första så kallad RC (Release Candidate) vilket innebär att man är väldigt nära det slutgiltiga resultatet. Samtidigt skrev man också att man hoppas på att den nya versionen kommer att bli klar för släpp i slutet av januari 2012!&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;img src="https://www.enkelmedia.se/media/4861/umbraco-v5.png" width="500" height="335" alt="Umbraco -v5"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I denna Umbraco V5 RC1 har man bland annat implementerat members-delen, man har jobbat med DictionaryItems för att få till språkstödet, gjort förbättringar på DocumentTypes och även arbetat med DynamicModel för att göra det ännu enklare att skriva grymma macros. Jag tänker labba lagom mycket med detta under julen, eftersom jag drar hem till Motala och käkar mammas julmat så får jag nog återkomma i mellandagarna med en eventuell kommentar ;)&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Du som är nyfiken kan redan nu &lt;a href="http://umbraco.codeplex.com/releases/view/79260" target="_blank"&gt;ladda ned RCn från CodePlex&lt;/a&gt;, och läsa mer i &lt;a href="http://umbraco.com/follow-us/blog-archive/2011/12/22/umbraco-5-rc1-is-out-today.aspx" target="_blank"&gt;HQs blogginlägg&lt;/a&gt; på Umbraco.org.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Samtidigt funderar jag. Kan alla MVC? Kommer version 5 alltid att bli det självklara valet? Vad tror du?&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;God Jul!!&lt;/p&gt;</description>
      <pubDate>Thu, 22 Dec 2011 23:45:00 Z</pubDate>
      <a10:updated>2011-12-22T23:45:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2c411b23-979c-49e3-998b-314ef828792c</guid>
      <link>https://www.enkelmedia.se/blogg/2011/11/18/samtrans-valde-umbraco-cms?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Samtrans valde Umbraco CMS</title>
      <description>&lt;p&gt;Vår senaste kund &lt;a href="http://www.samtrans.se" target="_blank"&gt;Samtrans&lt;/a&gt; gav oss förtroendet att implementera &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco CMS&lt;/a&gt; i den design som levererats av Vektorgrafik Stockholm.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4762/samtrans_screen_500x350.jpg"  width="500"  height="350" alt="Samtrans Screen"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Företaget sysslar med persontransporter för personer med speciella behov och hemsidan är en uppfräschning av deras tidigare hemsida. Läs gärna med om projketet bland våra &lt;a href="https://www.enkelmedia.se/referenser/samtrans" title="Samtrans"&gt;referenser&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Nov 2011 05:21:00 Z</pubDate>
      <a10:updated>2011-11-18T05:21:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">9835104f-95bc-44b8-a899-e3d1ccc92679</guid>
      <link>https://www.enkelmedia.se/blogg/2011/11/16/dax-att-lagga-xslt-pa-hyllan?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Dax att lägga XSLT på hyllan</title>
      <description>&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4680/xsltbooks.jpg" width="500" height="252" alt="Xslt Books"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;em&gt;Böcker som gjort sitt...&lt;/em&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;För några dagar sedan skrev Niels Hartvig, grundaren av Umbraco, ett &lt;a href="http://umbraco.com/follow-us/blog-archive/2011/11/10/saying-goodbye-to-an-old-friend.aspx" target="_blank"&gt;blogginlägg&lt;/a&gt; där han berättade att man nu kommer att släppa stödet för så kallade XSLT-makron i Umbraco.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;XSLT är en teknik som används för att formatera och och omformatera XML-dokument. Eftersom hela Umbraco-sajten, i dagsläget, sparas som ett XML dokument i webbserverns cache så har XSLT varit en extremt snabb teknik för att lista och filtrera innehåll.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I Umbraco 5, som bygger på ASP.NET MVC och är en komplett ombyggnad av grunden till Umbraco, kommer man att släppa stödet för XSLT och istället satsa enbart på Razor-makron. &lt;br /&gt;&lt;br /&gt;Jag tycker att det är bra! Som nybörjare på Umbraco minns jag att det största "hindret" för mig var just XSLT. XSLT är extremt snabbt men på samma sätt som det är snabbt är det krångligt och kräver relativt djup förstålse om XML, XPath osv. När Umbraco 5 nu istället baseras på Razor kommer den som arbetat med ASP.NET MVC att känna igen sig eftersom att Razor är den teknik som används för att programmera vyer i gränsnittet för MVC-sajter.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Så det är bara att lägga mina gamla XSLT-böcker på hyllan....&lt;/p&gt;</description>
      <pubDate>Wed, 16 Nov 2011 17:04:00 Z</pubDate>
      <a10:updated>2011-11-16T17:04:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">904edee3-15f3-492e-bcfd-a36e8d935b57</guid>
      <link>https://www.enkelmedia.se/blogg/2011/11/8/umbraco-user-group-i-sverige?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco User Group i Sverige</title>
      <description>&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4693/umbracousergroup.jpg" width="500" height="317" alt="Umbraco User Group"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag vill tipsa om den svenska användargruppen för Umbraco, UUGS (Umbraco User Group Sweden). Den startades för några månader sedan och kommer att hålla möten och seminarium med Umbraco som tema.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;För att gå med, besök hemsidan &lt;a href="http://www.uugs.se/" target="_blank"&gt;uugs.se&lt;/a&gt; och glöm inte att joina &lt;a href="http://www.facebook.com/#!/groups/umbracousergroupsweden/" target="_blank"&gt;facebook-gruppen&lt;/a&gt;! &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Vi ses och hörs! :D&lt;/p&gt;</description>
      <pubDate>Tue, 08 Nov 2011 17:24:00 Z</pubDate>
      <a10:updated>2011-11-08T17:24:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">06bed6b1-a4a5-4d9a-97c5-e3b0dd600fc3</guid>
      <link>https://www.enkelmedia.se/blogg/2011/11/3/bygga-ut-umbraco-backoffice-del-1?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Bygga ut Umbraco Backoffice - del 1</title>
      <description>&lt;p&gt;Jag tänkte gå igenom grunderna i hur man bygger ut Umbracos Backoffice/backend. Eftersom det redan finns ett bra gäng bloggposter om hur man lägger till sin egen "section" så tänkte jag fokusera på lite andra delar just nu.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Skapa egen section / application i Umbraco&lt;/h4&gt;&#xD;
&lt;p&gt;Det krävs lite småfix i databasen för att skapa sin egen section, det är inte särskilt avancerat och du kan läsa utförligt hur man gör i dessa poster:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.robertgray.net.au/2011/5/10/creating-a-custom-content-tree-in-umbraco.aspx" target="_blank"&gt;http://www.robertgray.net.au/2011/5/10/creating-a-custom-content-tree-in-umbraco.aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.sewen.se/blogg/2010/2/26/skapa-en-custom-section-i-umbraco-(steg-1).aspx" target="_blank"&gt;http://www.sewen.se/blogg/2010/2/26/skapa-en-custom-section-i-umbraco-(steg-1).aspx&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;h4&gt;Göra egna Webforms till Umbraco backoffice&lt;/h4&gt;&#xD;
&lt;p&gt;När du ska skapa dina egna .aspx-filer för redigeringsytan så är det en bra idé att använda Umbracos egna kontroller för backoffice. De finns i umbraco.uicontrols.controls. För att använda dessa på sida måste du lägga till följande rad i början av ditt aspx-dokument.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" &#xD;
Assembly="controls" %&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;När detta är fixat så kan du enkelt använda Umbracos orginal-kontroller och få din custom section att hålla samma konsekventa utseende som resten av backoffice.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag tänkte gå igenom några av de mesta grundläggande kontrollerna&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;TabView&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4511/tabview.png" width="498" height="49" alt="Tabview"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Om du vill använda tabbar skall du ha en TabView kontroll på sidan. Varje sida behöver bara EN TabView. Du skapar sedan valfritt antal tabs i din code behinde.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I din aspx-fil:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;umb:TabView ID="MyTabView" runat="server" Width="552px" Height="392px"/&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;För att lägga till tabbar används förljande kod i code behinde:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;protected override void OnInit(EventArgs e)&#xD;
{&#xD;
   base.OnInit(e);&#xD;
   &#xD;
    // Lägg till ny tab på MyTabView&#xD;
    var myTab = MyTabView.NewTabPage("Details");&#xD;
    myTab.Controls.Add(myPane);&#xD;
    // Ett tab till&#xD;
     var myTab2 = MyTabView.NewTabPage("New tab");&#xD;
     myTab2.Control.Add(anotherPane);&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Pane / PropertyPane&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;&lt;img src="https://www.enkelmedia.se/media/4506/pane-property.png" width="394" height="246" alt="Pane -property"/&gt;&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Det blå strecket markerar "umb:Pane" och de röda boxarna är PropertyPanels. Detta samarbete mellan Pane och PropertyPane ser man ofta i Umbracos backoffice. Koden ser ut ungefär så här:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;umb:Pane ID="myPane" runat="server" Text="Settings"&amp;gt;&#xD;
  &amp;lt;umb:PropertyPanel ID="PropertyPanel1" runat="server" &#xD;
    Text="Database datatype"&amp;gt;&#xD;
	&amp;lt;!-- DropDown goes here --&amp;gt;&#xD;
  &amp;lt;/umb:PropertyPanel&amp;gt;&#xD;
  &amp;lt;umb:PropertyPanel id="PropertyPanel2" runat="server" &#xD;
    Text="Add prevalue"&amp;gt;&#xD;
	&amp;lt;!-- Textbox goes here --&amp;gt;&#xD;
  &amp;lt;/umb:PropertyPanel&amp;gt;&#xD;
&amp;lt;/umb:Pane&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;MenuImageButton och MenuIcon&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Det finns två olika typer av knappar som kan adderas till en TabView. Visuellt syns ingen skillnad, det är knapparnas funktion som skiljer sig.&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;MenuImageButton - Används om du vill att knappen ska fira av ett click-event och en postback.&lt;/li&gt;&#xD;
&lt;li&gt;MenuIcon - Används om knappen istället ska anropa en javascript-funktion.&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;MenuImageButton:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;btnImage = dataTab.Menu.NewImageButton();&#xD;
btnImage.ID = id;&#xD;
btnImage.Click += new ImageClickEventHandler(SaveButton_Click);&#xD;
btnImage.AlternateText = "Save";&#xD;
btnImage.ImageUrl = GlobalSettings.Path + "/images/editor/save.gif";&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;MenuIcon:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;btnImageIcon = dataTab.Menu.NewIcon();&#xD;
btnImageIcon.ID = "btnImageIcon";&#xD;
btnImageIcon.OnClickCommand = "alert('Run javascript')";&#xD;
btnImageIcon.ImageURL = GlobalSettings.Path + "/images/editor/save.gif";&#xD;
btnImageIcon.AltText = "Show alert";&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;CodeArea&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;I Umbracos backoffice används ibland en inbyggd kodeditor. Den kan även du använda i dina egna projekt genom att infoga en CodeArea.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4641/umbraco_codearea.png" width="500" height="339" alt="Umbraco codearea"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Så här kan koden se ut:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;umb:CodeArea ID="editor" ClientSaveMethod="doSubmit" CodeBase="Python" &#xD;
AutoResize="true" OffSetX="47" OffSetY="55" runat="server" /&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;ClientSaveMethod är inte obligatorisk och används för att hantera om användaren trycker "Ctrl+S" i editorn. Egenskapen CodeBase krävs inte heller. När du arbetar med denna CodeArea i code behinde använd egenskapen "Text" för att sätta/hämta innehållet.&lt;/p&gt;</description>
      <pubDate>Thu, 03 Nov 2011 06:29:00 Z</pubDate>
      <a10:updated>2011-11-03T06:29:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">8b480cfd-d0aa-46d6-a693-cb30f10bc83a</guid>
      <link>https://www.enkelmedia.se/blogg/2011/10/25/tomma-umbracos-papperskorg?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Tömma Umbracos papperskorg</title>
      <description>&lt;p&gt;Jag läste precis några av mina favoritbloggar om Umbraco och såg att några tipsade om hur man enkelt tömmer papperskorgen.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://www.blogfodder.co.uk/2011/5/26/mass-delete-over-1k-nodes-from-recycle-bin-in-47" target="_blank"&gt;http://www.blogfodder.co.uk/2011/5/26/mass-delete-over-1k-nodes-from-recycle-bin-in-47&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;a href="http://anthonydotnet.blogspot.com/2011/07/umbraco-empty-recycle-bin-hangs.html" target="_blank"&gt;http://anthonydotnet.blogspot.com/2011/07/umbraco-empty-recycle-bin-hangs.html&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag rekommenderar paketet "F.A.L.M Housekeeping" som dels kan radera papperskorgen men även loggar, rollbacks och mycket annat. &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping" target="_blank"&gt;http://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4609/housekeeping.jpg" width="362" height="630" alt="Housekeeping"/&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 25 Oct 2011 04:40:00 Z</pubDate>
      <a10:updated>2011-10-25T04:40:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">a0e6d68f-f708-42cd-a281-8e1c355ffdab</guid>
      <link>https://www.enkelmedia.se/blogg/2011/10/6/livsfarligt-utan-stringbuilder?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Livsfarligt utan StringBuilder</title>
      <description>&lt;p&gt;Det är egentligen helt självklart och hör till grunderna inom .NET men jag måste verkligen dela med mig av den här historien för att göra det övertydligt. Det handlar om att sätta ihop (concat) strängar. Det finns ett väldigt enkelt sätt att göra detta som ser ut ungefär så här:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;strVariable += "mer saker i strängen"&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Detta sätt att sätta ihop strängar har jag använt en hel del genom åren. Jag har ofta läst om att StringBuilder-klassen är snabbare och bättre eftersom att den endast håller ett objekt i minnet, den skall alltså användas när det handlar om större objekt tex om concaten sker i en loop. En kod liknande den nedan fanns i ett projekt jag fick ta över.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;foreach(var yada in yadaYada)&#xD;
{&#xD;
  strVariable += "mer saker i strängen"&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;Funktionen som ibland hanterade tiotusentals rader var extremt seg. Kan det vara Entity Framework (som också var inblandat) som spökar? Svaret var klart och tydligt nej. Det beror på att vi inte använder StringBuilder. Loopen ovan med 15 000 rader tog cirka 25 sekunder för vår testmaskin att processa. Gissa tiden för samma loop fast med StringBuilder?&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;foreach(var yada in yadaYada)&#xD;
{&#xD;
  stringBuilder.Append("mer saker i strängen");&#xD;
}&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Den tog 0,21 sekunder. Det är helt sjukt vilken enorm skillnad. Enligt vad jag förstår så kommer kompilatorn att döda den gamla och skapa en ny sträng i minnet varje gång loopen körs i första exemplet, i andra, med StringBuildern används samma objekt. Värt att veta alltså:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;StringBuilder.Append 00:00.0210012 sekunder&lt;br /&gt;Html+html 00:26.9005386 sekunder&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 06 Oct 2011 14:47:00 Z</pubDate>
      <a10:updated>2011-10-06T14:47:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">0cc62650-6688-4d71-ab6d-da8acbeab25e</guid>
      <link>https://www.enkelmedia.se/blogg/2011/9/26/intellisense-pa-kontroller-i-umbraco-uicontrols?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Intellisense på kontroller i umbraco.uicontrols</title>
      <description>&lt;p&gt;När man utvecklar egna sections till Umbracos backoffice så är det lämpligt att återanvända standardkontrollerna i Umbraco. Dessa finns i umbraco.uicontrols och används genom att lägga till följande rad i början av din aspx-fil.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" &#xD;
Assembly="controls" %&amp;gt;&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;br /&gt;&lt;img src="https://www.enkelmedia.se/media/4529/addreference.png" width="281" height="285" alt="Add Reference" style="float: right;"/&gt;När jag gjorde detta i ett nytt projekt för att tag sedan märkte jag att Visual Studio vägrade att ge mig Intellisense på kontrollerna vilket var sjukt irriterande. Efter lite googlade så hittade jag &lt;a href="http://our.umbraco.org/forum/using/ui-questions/18715-Can%27t-access-umbracouicontrols" target="_blank"&gt;denna tråd&lt;/a&gt; som presenterade den enkla lösningen:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Lägg till en referens till ClientDependency.Core.dll i ditt projekt och saken är biff.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Mon, 26 Sep 2011 06:24:00 Z</pubDate>
      <a10:updated>2011-09-26T06:24:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">7c3fda30-ca8f-4b2d-8fd5-81e429f9fcfb</guid>
      <link>https://www.enkelmedia.se/blogg/2011/9/15/screencasts-om-umbraco-cms?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Screencasts om Umbraco CMS</title>
      <description>&lt;p&gt;Vår utvecklare Markus Johansson har gjort en kort introduktion till Umbraco CMS du som skall redigera sajten ser hur enkelt det är att arbeta med detta underbara publiceringsverktyg och du som ska utveckla får upptäcka enkelheten och skalbarheten.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;För dig som ska uppdatera hemsidan&lt;/h4&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;iframe width="520" height="349" src="https://www.youtube.com/embed/q_qpcqH4u10?hl=sv&amp;amp;fs=1" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;För dig som är utvecklare&lt;/h4&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;iframe width="520" height="349" src="https://www.youtube.com/embed/EVkwtej0KMA?hl=sv&amp;amp;fs=1" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 15 Sep 2011 18:06:00 Z</pubDate>
      <a10:updated>2011-09-15T18:06:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">caf6a888-9913-4cec-9fdf-08b2f30b67ab</guid>
      <link>https://www.enkelmedia.se/blogg/2011/8/26/kopiera-databas-fran-sql-server-2008-till-2005?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Kopiera databas från SQL Server 2008 till 2005</title>
      <description>&lt;p&gt;I vår utvecklingsmiljö använder vi SQL Server 2008 och för ett tag sedan utvecklade vi en Umbraco-lösning med denna databas som grund. När detta skulle implementeras till kundens produktionsmiljö visade det sig att de körde SQL Server 2005. Det innebär att man inte kan kopiera mdf-filen eller skapa en backup och återställa den på servern som man annars hade kunnat göra.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Lösningen som vi kom fram till blev att scripta hela databasen så här:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;1. Öppna SQL Server Managament Studio.&lt;br /&gt; 2. Högerklicka på den databas du vill exportera och välj "Generate Scripts"&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4323/copy-database-11.png" width="542" height="472" alt="Copy -database -11"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;3. I steget options glöm INTE att klicka i följande:&lt;br /&gt;  - Script Bindings = True&lt;br /&gt;  - Script for sever version = SQL Server 2005&lt;br /&gt;  - Script logins = True&lt;br /&gt;  - Script Data = True&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/4316/copy-database-2.png" width="552" height="511" alt="Copy -database -2"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;4. Klart&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;EDIT:&lt;br /&gt;I senare versioner av Management Studio har man ändrat valet ovan så att det ser ut så här:&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/16911/sqlser.png" alt="Sqlser"/&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Fri, 26 Aug 2011 14:58:00 Z</pubDate>
      <a10:updated>2011-08-26T14:58:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">ea3b34f2-b514-423c-853d-42eefbe04b44</guid>
      <link>https://www.enkelmedia.se/blogg/2011/8/26/umbraco-i-produktionsmiljo?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Umbraco i produktionsmiljö</title>
      <description>&lt;p&gt;När utvecklingen av en &lt;a href="https://www.enkelmedia.se/innehall/umbraco-cms" title="Umbraco CMS"&gt;Umbraco-sajt&lt;/a&gt; är klar och hemsidan skall göras publik finns det en del saker att tänka på. Det är många moment och småsaker som kan vara lätt ass missa. Därför tänkte jag dela med mig av min nuvarande checklista.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;ConnectionString - Glöm inte att ändra kopplingen till den databas som skall användas i produktionsmiljön.&lt;/li&gt;&#xD;
&lt;li&gt;Stäng av UmbracoDebug genom att sätta "&lt;span&gt;umbracoDebugMode" to false i web.config.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Slipp "Uppgraderingsmeddelanden" i backend genom att sätta umbracoDisableVersionCheck till false eller umbracoVersionCheckPeriod till 0 även detta i web.config.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Sätt "CustomErrors" till RemoteOnly för att inte exponera eventuella fel till användare/hackers.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Sätt debug till false i kompileringssektionen.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Dubbelkolla att mapprättigheterna är korrekta i produktionsmiljön - &lt;a href="http://our.umbraco.org/wiki/install-and-setup/set-umbraco-folder-permissions-from-command-line" target="_blank"&gt;Länk till artikel på umbraco.org&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Aktivera "Health Monitoring" i web.config. Då får du tex. mail om ett fel uppstår på servern. &lt;a href="http://msdn.microsoft.com/en-us/library/bb398933.aspx" target="_blank"&gt;Lär mer om health monitoring&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Städa i din Umbraco-installation. Tabort gammla logposter, mediafiler och annat som tar onödig plats. Använd pluginen &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping" target="_blank"&gt;FALM Housekeeping&lt;/a&gt; av Adriano Fabri.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Ge din kund en kram.&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;&#xD;
&lt;/ul&gt;</description>
      <pubDate>Fri, 26 Aug 2011 05:42:00 Z</pubDate>
      <a10:updated>2011-08-26T05:42:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">e416bd3e-d5bf-4a36-b9c2-e3e11f9a07fb</guid>
      <link>https://www.enkelmedia.se/blogg/2011/8/24/sortera-efter-datum-i-xslt?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Sortera efter datum i XSLT</title>
      <description>&lt;p&gt;Jag jobbade med ett RSS-macro som skulle lista blogg inläggen från bland annat  denna blogg. Mallen kräver att man kan sortera posterna efter datum i fallande ordning. Eftersom xsl-sort har ett element som heter data-type så forskade jag i om man kunde sätta danna till date - vilket inte gick. De enda värden som är gilltiga är text, number och qname.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Därför blev min lösning att konvertera datumet till siffror och sedan sortera efter nummer.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;xsl:apply-templates &#xD;
 select="$currentPage/descendant::SimpleBlogPost [@isDoc]"&amp;gt;&#xD;
   &amp;lt;xsl:sort &#xD;
   select="umbraco.library:FormatDateTime(postDate ,'yyyyMMddhhmmss')" &#xD;
   data-type="number" order="descending" /&amp;gt;&#xD;
&amp;lt;/xsl:apply-templates&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Wed, 24 Aug 2011 05:35:00 Z</pubDate>
      <a10:updated>2011-08-24T05:35:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2bb6d471-7e28-4bce-a6bf-fa35c1b61682</guid>
      <link>https://www.enkelmedia.se/blogg/2011/8/23/bra-inspiration?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Bra inspiration</title>
      <description>&#xD;
&lt;p&gt;&lt;a href="http://www.webappers.com" target="_blank"&gt;&lt;img src="https://www.enkelmedia.se/media/4217/webappers_logo.png" width="433" height="92" alt="Webappers _logo"/&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Jag tycker verkligen om tips-bloggen "WebAppers" som tipsar om&#xD;
coola gratis scripts, tips och tekniker för att göra din sajt&#xD;
snyggare och mer användarvänlig. Ett måste bland bokmärkena.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Länk: &lt;a href="http://www.webappers.com/"&#xD;
target="_blank"&gt;http://www.webappers.com&lt;/a&gt;&lt;/p&gt;&#xD;
</description>
      <pubDate>Tue, 23 Aug 2011 10:32:00 Z</pubDate>
      <a10:updated>2011-08-23T10:32:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">189cd06f-5a77-46c5-b7e9-64098261cfea</guid>
      <link>https://www.enkelmedia.se/blogg/2011/6/29/nya-sidan-lanserad?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Nya sidan lanserad</title>
      <description>&lt;p&gt;&lt;span&gt;Nu är vår nya hemsida lanserad. Eftersom vi är stora förespråkare av Umbraco CMS så valde vi att bygga även vår egna sida med detta system som grund. Såhär ser det ut just nu när jag skriver detta blogginlägg.&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;span&gt;&lt;img src="https://www.enkelmedia.se/media/3545/umbracocms-470-screenshot.jpg" width="515" height="412" alt="Umbracocms -470-screenshot"/&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;span&gt;För just vår hemsida har det inte krävts några enorma utbyggnader av Umbracos grund men vi har använt följande moduler:&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;&lt;span&gt;&lt;a href="http://our.umbraco.org/projects/backoffice-extensions/google-maps-datatype" target="_blank"&gt;Google Maps Datatype&lt;/a&gt; av Darren Fergus&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;Simple blog - Som är ett framtida blogg-paket som vi ska lansera för Umbraco&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;span&gt;&lt;a href="http://our.umbraco.org/projects/backoffice-extensions/syntax-highlighter-plugin" target="_blank"&gt;Syntax Highlighter 1.0&lt;/a&gt; som vi själva utvecklat.&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;span&gt;Vi har också använt oss av den nya funktionaliteten med &lt;a href="http://umbraco.com/follow-us/blog-archive/2011/2/23/umbraco-47-razor-feature-walkthrough-%E2%80%93-part-1" target="_blank"&gt;Razor-macron&lt;/a&gt; som är riktigt användbar och effektiv att arbeta med!&lt;/span&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 29 Jun 2011 16:05:00 Z</pubDate>
      <a10:updated>2011-06-29T16:05:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">b00777eb-690f-4e30-8a42-13cf16c88719</guid>
      <link>https://www.enkelmedia.se/blogg/2011/2/23/rest-base-i-umbraco?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Rest/Base i Umbraco</title>
      <description>&#xD;
&lt;p&gt;En intressant och användbar del av Umbraco är "Base", där&#xD;
används REST för att på ett enkelt sätt göra det möjligt att&#xD;
kommunicera med Umbraco, dels från Umbracosajten, men även från&#xD;
externa sytstem.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Mer info om Rest (Representational State Transfer) finns bland&#xD;
annat här:&#xD;
http://sv.wikipedia.org/wiki/Representational_State_Transfer&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Det är sjukt enkelt att få REST att fungera i Umbraco.&lt;/p&gt;&#xD;
&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Skapa en klass med statiska methoder som skall exponeras.&lt;/li&gt;&#xD;
&#xD;
&lt;li&gt;Lägg assemblyt i Umbracos bin-katalog&lt;/li&gt;&#xD;
&#xD;
&lt;li&gt;Konfigurera Umbraco-Base i filen "restExtensions.config"&lt;/li&gt;&#xD;
&#xD;
&lt;li&gt;Ös på&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Exempel och mer info finns här:&#xD;
http://umbraco.org/documentation/books/introduction-to-base/simple-base-samples&lt;/p&gt;&#xD;
</description>
      <pubDate>Wed, 23 Feb 2011 15:22:00 Z</pubDate>
      <a10:updated>2011-02-23T15:22:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">4e4e974c-0d8d-47ca-ba08-9c58e7bbc359</guid>
      <link>https://www.enkelmedia.se/blogg/2010/11/3/sortorder-beter-sig-konstigt?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>@SortOrder beter sig konstigt</title>
      <description>&lt;p&gt;Jag har vid ett antal tillfällen förbryllats över hur XSLT rendering från &lt;a&gt;Umbraco&lt;/a&gt;, trots att sen nod-lista är korrekt sorterad i backend, inte visar noderna i den ordning som den "borde".&lt;br /&gt; &lt;br /&gt; Jag har hela tiden använt mig av denna kod för att sortera mina noder i en XSLT-loop:&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;xsl:sort select="@sortOrder" order="ascending" /&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Detta fram tills att jag läst en bloggpost som sa att man borde skicka med datatypen.&lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;xsl:sort select="@sortOrder" order="ascending" data-type="number" /&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Utan egenskapen för "data-type" så hanteras numren som strängar (läs: sorteras enligt dessa principer) men när man sätter datatypen till "number" så kommer sorteringen att bli korrekt.&lt;/p&gt;</description>
      <pubDate>Wed, 03 Nov 2010 14:26:00 Z</pubDate>
      <a10:updated>2010-11-03T14:26:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">4d66f545-14e0-472e-8f34-0576cdad20e4</guid>
      <link>https://www.enkelmedia.se/blogg/2010/9/28/fel-vid-uppgradering-till-net-3-5?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Fel vid uppgradering till .NET 3.5</title>
      <description>&lt;p&gt;Har precis hjälpt en kund som fick problem när deras webbhotell valde att uppgradera sina gamla windows 2003-servrar med ASP.NET 2.0 till Windows 2008 och ASP.NET 3.5.&lt;br /&gt; &lt;br /&gt; Det var flera fel som uppstod...&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Inget ASP.NET Ajax Installerat&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Det första felmeddelandet som visades var följande:&lt;/p&gt;&#xD;
&lt;div class="code"&gt;&#xD;
&lt;p&gt;Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be loaded.&lt;/p&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Detta fel uppstår när Umbraco försöker att komma åt ASP.NET Ajax. Webbhotellet hade glömt, eller stuntat i att återinstallera detta på servern vilket gjorde att dessa assemblies behövde adderas till bin-katalogen. Att kopiera in följande filer löste problemet:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;System.Web.Extensions.Design.dll&lt;/p&gt;&#xD;
&lt;p&gt;System.Web.Extensions.dll&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Uppdatera Web.Config för att passa .NET Framework 3.5&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Den nya servern körde .NET framwork 3.5 istället för 2.0 vilket gjorde att kunden ville köra Umbraco-instanserna i denna version. Detta kräver relativt stora ändringar i web.config. Läs mer om denna uppgraderingen här:&lt;br /&gt; &lt;a href="http://umbraco.org/26156"&gt;http://umbraco.org/26156&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Lösenord fungerade inte i Umbraco Backend&lt;/p&gt;&#xD;
&lt;p&gt;På en av sajterna dök ett sista problem upp. Användarnas lösenord i backend fungerade inte korrekt efter uppgraderingen. De flesta umbracoinstanserna som kördes var 4.0.2.1 - den version där hashade lösenord infördes som standard. Den instans som krånglade körde version 4.0.0 så lösningen var enkel:&lt;br /&gt; &lt;br /&gt; Lösenorden i databasen var inte hashade, men i den nya web.config-filen förutsattes att lösenorden var hashade. Följande ändring gjordes:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15"&amp;gt;&#xD;
             &amp;lt;providers&amp;gt;&#xD;
                 &amp;lt;clear /&amp;gt;&#xD;
 &#xD;
                &amp;lt;add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" /&amp;gt;&#xD;
                 &amp;lt;add name="AspNetSqlMemberShipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" /&amp;gt;&#xD;
                 &amp;lt;add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" /&amp;gt;&#xD;
               &amp;lt;/providers&amp;gt;&#xD;
         &amp;lt;/membership&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Blev till:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15"&amp;gt;&#xD;
             &amp;lt;providers&amp;gt;&#xD;
                 &amp;lt;clear /&amp;gt;&#xD;
                 &amp;lt;add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" /&amp;gt;&#xD;
                 &amp;lt;add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" /&amp;gt;&#xD;
             &amp;lt;/providers&amp;gt;&#xD;
         &amp;lt;/membership&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Dvs - passwordFormat="Hashed" raderades så att umbraco inte skulle försöka hasha lösenord när de ska matchas vid inloggning.&lt;/p&gt;</description>
      <pubDate>Tue, 28 Sep 2010 14:13:00 Z</pubDate>
      <a10:updated>2010-09-28T14:13:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2e5e49dd-d701-4c15-8267-90596cc7cc5f</guid>
      <link>https://www.enkelmedia.se/blogg/2010/8/30/tradvyen-i-backend-sludade-fungera?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Trädvyen i backend sludade fungera</title>
      <description>&lt;p&gt;Har precis jobbat mycket med en Umbraco-lösning där jag också använder delar av AjaxControlToolkit (ACT). Detta kit skeppades för första gången av Microsoft omkring fyra-fem år sedan i sin första version, version 1.0.&lt;br /&gt; &lt;br /&gt; Det är denna version som finns inkluderad i Umbraco 4.0.5 som jag använder i denna lösning.&lt;br /&gt; &lt;br /&gt; Helt plötsligt, mitt under arbetet med mina UserControls och XSLT-macron upptäckte jag att backendsystemet slutat fungera. Trädvyerna expanderades inte på någon av "tabbarna", inte under content, inte media, ja ingenstans.&lt;br /&gt; &lt;br /&gt; Jag rullade tillbaka en backup som var några månader gammal och upptäckte efter lite letande att jag refererat till en nyare version av ATC i ett av mina projekt - dessa projekt har post-build events som skriver över BIN-filerna i Umbraco-lösningen.&lt;br /&gt; &lt;br /&gt; Dvs - Den nyare versionen (4.0) av ACT hamnade i bin-mappen på min skarpa lösning. Detta ställer alltså till problem med Umbracos backend. Jag rullade tillbaka ACT till version 1.0 vilket löste problemet.&lt;/p&gt;</description>
      <pubDate>Mon, 30 Aug 2010 14:18:00 Z</pubDate>
      <a10:updated>2010-08-30T14:18:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">775e7b6e-4b65-4123-b2ce-2f59ad5bf0f5</guid>
      <link>https://www.enkelmedia.se/blogg/2010/6/24/parametrar-i-macron?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Parametrar i Macron</title>
      <description>&lt;p&gt;Både XSLT macron och UserControls kan ha parametrar. Dessa kan skrivas i direkt i ko&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;umbraco:macro alias="RenderProperties" paramvalue="Parameter direkt i kod" runat="server"/&amp;gt;&lt;br /&gt;  &lt;/p&gt;&#xD;
&lt;p&gt;Eller så kan värdet hämtas ifrån andra delar av systemet. Tex ifrån den aktuella noden:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;umbraco:macro alias="RenderProperties" paramvalue ="[$pageTitle]" runat="server"/&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Det finns fyra andra källor för parameter-värden i Umbraco:&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Page value: [#propertyAlias]&lt;/li&gt;&#xD;
&lt;li&gt;Page properties value: [$propertyAlias]&lt;/li&gt;&#xD;
&lt;li&gt;Cookie value: [%cookieValueKey]&lt;/li&gt;&#xD;
&lt;li&gt;Request collection  (tex QueryString): [@requestValueKey]&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Flera värden, ibland kan man vilja ha flera värden och ta den första som faktiskt inte är noll då funkar detta:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;umbraco:macro paramvalue ="[#propertyAlias],[#propertyAlias2],my static string" /&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Thu, 24 Jun 2010 14:19:00 Z</pubDate>
      <a10:updated>2010-06-24T14:19:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">aa03347e-5661-4e8a-9d35-2fb068fb32cc</guid>
      <link>https://www.enkelmedia.se/blogg/2010/2/25/debugga-visual-studio-med-firefox?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Debugga Visual Studio med Firefox</title>
      <description>&#xD;
&lt;p&gt;Något som stört mig ett tag är att Firefox tenderar att vara&#xD;
sjukt långsamt när man debuggar Visual Studio-projekt via den&#xD;
inbygga webservern i VS.&lt;br /&gt;&#xD;
&lt;br /&gt;&#xD;
En snabb googling gav mig denna tråd på grymma Stack Overflow: &lt;a&#xD;
href="http://stackoverflow.com/questions/24959/debugging-asp-net-with-firefox-and-visual-studio-net-very-slow-compared-to-ie"&#xD;
 target="_blank"&gt;http://stackoverflow.com/questions/24959/debugging-asp-net-with-firefox-and-visual-studio-net-very-slow-compared-to-ie&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Slutsatsen är helt enkelt att man måste inaktivera ipv6 i&#xD;
Firefox, enklaste sättet att göra det är följande:&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Skriv about:config i Firefox adressbar, klicka ja på&#xD;
säkerhetsmeddelandet.&lt;/li&gt;&#xD;
&#xD;
&lt;li&gt;Skriv disableIPv6 i filterboxen högst upp och tryck enter.&#xD;
Inställningen "network.dns.disableIPv6" visas.&lt;/li&gt;&#xD;
&#xD;
&lt;li&gt;Dubbelklicka på "false" så att värdet ändras till true.&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&#xD;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;När dessa enkla steg är fixade går det tokfort att debugga med&#xD;
Firefox, vilket är supernice eftersom man då kan använda sig av&#xD;
bland annat &lt;a href="http://getfirebug.com/"&#xD;
target="_blank"&gt;Firebug&lt;/a&gt;.&lt;/p&gt;&#xD;
</description>
      <pubDate>Thu, 25 Feb 2010 15:22:00 Z</pubDate>
      <a10:updated>2010-02-25T15:22:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">7cf609b5-1267-408e-994e-1898cdfb21c2</guid>
      <link>https://www.enkelmedia.se/blogg/2010/2/16/membership-och-roles?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Membership och Roles</title>
      <description>&lt;p&gt;Jobbar på en lösning som ska dela användare mellan en vanlig ASP.NET WebApplication och en Umbraco-Instans. Till detta skall även användarinfo kunna uppdateras med Batchar som hämtar XML-data och uppdaterar bla adressuppgifter och betalstatus.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Jag tittade närmare på två lämpliga lösningar och jag tänkte gå igenom dem här:&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;1. Användare i Umbraco&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Spara användarna i Umbraco och jobba med dem via Umbracos API. Det visade sig att det var krångligt att få igång APIt utanför Umbraco-instansen och att allt arbete med användare och dess egenskaper i Umbraco är databasintensivt.&lt;br /&gt; &lt;br /&gt; Ett möjligt alternativ vore att skriva direkt till Umbraco-databasen via webbappen, men alternativet känns inte aktuellt då Umbracos datastruktur är komlex och bör behandlas via dess API.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;strong&gt;2. Användare i ASP.NET-applikationen&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Skapa en skräddarsydd databas där användare sparas och sedan låta båda lösningarna hämta sina användare/roller från denna plats. Det innebär att jag måste skriva en ny MembershipProvider och RoleProvider till Umbraco, även att användarhanteringen i Umbracos backend inte fungerar fullt ut.&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Lösningen&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Trots arbetet med nya providers och det faktum att backend inte fungerar till 100% så valde jag lösning 2. Att ha full kontroll över användarens data och slippa avancerade databasstrukturer vid batchjobben var mer värdefullt än de få funktioner som inte fungerar i backend pga Custom Providers.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;</description>
      <pubDate>Tue, 16 Feb 2010 15:23:00 Z</pubDate>
      <a10:updated>2010-02-16T15:23:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">b3b11adb-8501-42dc-912c-9d29be0a6946</guid>
      <link>https://www.enkelmedia.se/blogg/2010/1/2/tomma-divar-forsvinner?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Tomma divar försvinner</title>
      <description>&lt;p&gt;Upptäckte ett intressant problem med att använda divar i XSLT. Följande kod används ofta för att "cleara" divar när man kör dem flytande.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div class="code"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;div class="clear"&amp;gt;&amp;lt;/div&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;I försökte använda den i ett macro, den låg "wrappad" i en annan div - såhär:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div class="code"&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;div&amp;gt;&#xD;
 &#xD;
   &amp;lt;div class="clear"&amp;gt;&amp;lt;/div&amp;gt;&#xD;
 &#xD;
&amp;lt;/div&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;När denna proccessades av XSLT transormatorn i Umbraco så blev det renderades inte den sista stängningen av div-taggen. Jag löste det genom att köra följande kod:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div class="code"&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: xml"&gt;  &amp;lt;div&amp;gt;&#xD;
&#xD;
      &amp;lt;div class="clear"&amp;gt;&amp;amp;nsbp;&amp;lt;/div&amp;gt;&#xD;
&#xD;
  &amp;lt;/div&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;/div&gt;</description>
      <pubDate>Sat, 02 Jan 2010 15:23:00 Z</pubDate>
      <a10:updated>2010-01-02T15:23:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">9c52708b-4072-4b91-be79-33d5b208348f</guid>
      <link>https://www.enkelmedia.se/blogg/2009/9/6/begransa-listade-poster-xslt?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Begränsa listade poster XSLT</title>
      <description>&lt;p&gt;Ibland vill man tex att Umbraco ska visa de 10 senaste posterna i en nod eller kanske de 10 senaste av en speciell document type.&lt;/p&gt;&#xD;
&lt;p&gt;Så här kan man använda XSLT för att begränsa antalet poster som lämnas från en for-each-loop.&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;xsl:for-each select="$currentPage/node"&amp;gt;&#xD;
&#xD;
&amp;lt;xsl:sort select="@sortOrder" order="descending"/&amp;gt;&#xD;
&#xD;
    &amp;lt;!-- xsl-if kollar att positionen är under 11 dvs, högst 10. &#xD;
    Om så inte är fallet skrivs inget ut. --&amp;gt;&#xD;
&#xD;
   &amp;lt;xsl:if test="position() &amp;lt; 11"&amp;gt;&#xD;
&#xD;
       &amp;lt;xsl:value-of select="@nodeName"/&amp;gt;&amp;lt;br/&amp;gt;&#xD;
   &amp;lt;/xsl:if&amp;gt;&#xD;
&amp;lt;/xsl:for-each&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Såhär fungerar det:&lt;br /&gt; &lt;br /&gt; &amp;lt;xsl:sort&amp;gt; Används för att sortera resultatet. Select-parametern anger efter vilket värde det skall sorteras och order-parametern anger om det skall vara fallande eller stigande ordning (ascending, descending).&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; XSLT-funktionen Position() returnerar nummet på den post som just nu bearbetars i loopen. Med hjälp av &amp;lt;xsl:if&amp;gt; anger vi att endast de fem första posterna ska visas, dvs poster som har ett värde under 10.&lt;br /&gt; &lt;br /&gt; Tecknen &amp;amp;lt; och &amp;amp;gt; betyder samma sak som &amp;lt; och &amp;gt;, dessa tecken är skyddade i XSLT och måste därför ersättas med &amp;amp;gt; och &amp;amp;lt&amp;amp;, dvs greater than och lower than.&lt;/p&gt;</description>
      <pubDate>Sun, 06 Sep 2009 19:20:00 Z</pubDate>
      <a10:updated>2009-09-06T19:20:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">dcf0e3e8-cdf3-4d22-95f1-641693021462</guid>
      <link>https://www.enkelmedia.se/blogg/2009/6/30/ny-node-overst-i-nodlistan?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Ny node överst i nodlistan</title>
      <description>&lt;p&gt;Jag har byggt ett system till en kund som arbetar med &lt;a href="http://www.soundforce.se/" target="_blank"&gt;ljud och ljus&lt;/a&gt;. Kunden uppdaterar själv sidan med Umbraco 4.0.2. Sidan är uppbyggd med moduler med text, bild, bildspel, video osv. Dessa sorteras sedan och visas i den ordning som listan är sorterad.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;En frustrerade sak som jag upptäckte var att Umbraco automatiskt lägger till en ny nod längst ned i nodlistan. Ofta vill man ju att nya inlägg/noder ska hamna högst upp. Att sortera i omvänd ordning blir ologiskt - noderna bör ju visas på samma sätt i nodlistan som på själva sidan. Problemet med att Umbraco lägger nya noder längst ned gör att man efter varje nytt inlägg måste sorta för att få de nya inlägget/noden högst upp.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;För att komma runt detta och få mina nya noder att hamna högst upp skapade jag en metod som prenumererar på händelsen "umbraco.BusinessLogic.Actions.ActionNew()" som aktiveras när en ny nod har skapats. Läs mer om händelser i på &lt;a href="http://umbraco.org/documentation/books/creating-and-using-an-action-handler" target="_blank"&gt;umbraco.org&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt; Följande kod gör att en ny nod automatiskt hamnar högst upp i nodlistan istället för tvärtom:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;div dir="ltr" id="CodeDiv"&gt;&#xD;
&lt;pre class="brush: csharp"&gt;using System;&#xD;
using System.Collections.Generic;&#xD;
using System.Linq;&#xD;
using System.Web;&#xD;
using System.IO;&#xD;
using umbraco;&#xD;
using umbraco.interfaces;&#xD;
 &#xD;
using umbraco.BusinessLogic.Actions;&#xD;
using umbraco.BusinessLogic.console;&#xD;
using umbraco.cms.businesslogic.web;&#xD;
 &#xD;
namespace em.umb.sortnewnode&#xD;
{&#xD;
   &#xD;
    public class DefaultValueHandler : umbraco.BusinessLogic.Actions.IActionHandler&#xD;
    {&#xD;
        string umbraco.BusinessLogic.Actions.IActionHandler.HandlerName()&#xD;
        {&#xD;
            return "em.umb.sortnewnode";&#xD;
        }&#xD;
 &#xD;
        umbraco.interfaces.IAction[] umbraco.BusinessLogic.Actions.IActionHandler.ReturnActions()&#xD;
        {&#xD;
            return new umbraco.interfaces.IAction[] { new umbraco.BusinessLogic.Actions.ActionNew() };&#xD;
        }&#xD;
 &#xD;
       &#xD;
        Boolean umbraco.BusinessLogic.Actions.IActionHandler.Execute(umbraco.cms.businesslogic.web.Document documentObject, umbraco.interfaces.IAction action)&#xD;
        {&#xD;
           &#xD;
 &#xD;
            // Getting the fist node.&#xD;
 &#xD;
            Document.GetChildrenForTree(documentObject.Id);&#xD;
 &#xD;
 &#xD;
 &#xD;
           // Creating a generic list of Documents&#xD;
            List&amp;lt;Document&amp;gt; docs = new List&amp;lt;Document&amp;gt;();&#xD;
 &#xD;
 &#xD;
 &#xD;
            foreach(IconI d in documentObject.Parent.Children) {&#xD;
                docs.Add(new Document(d.UniqueId));&#xD;
            }&#xD;
 &#xD;
&#xD;
            // Sorting the list by sortOrder using Linq.&#xD;
 &#xD;
            var res = (from d in docs&#xD;
                       orderby d.sortOrder ascending&#xD;
                       select d);&#xD;
 &#xD;
 &#xD;
 &#xD;
           // Picking the first node&#xD;
 &#xD;
            Document firstDoc = res.First();&#xD;
 &#xD;
 &#xD;
 &#xD;
           // Setting sortOrder on the new node, by taking the first nod minus 5.&#xD;
 &#xD;
            documentObject.sortOrder = firstDoc.sortOrder - 5;&#xD;
 &#xD;
 &#xD;
 &#xD;
            return true;&#xD;
 &#xD;
        }&#xD;
    }&#xD;
 &#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Självklart är jag medveten om att man kanske vill kunna ställa in detta på katalognivå eller kanske confa det i web-config - har dock inte behövt denna funktionalitet. Lovar att återkomma med eventuella uppdateringar.&lt;/p&gt;</description>
      <pubDate>Tue, 30 Jun 2009 14:27:00 Z</pubDate>
      <a10:updated>2009-06-30T14:27:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">0b711bb8-1a1b-4360-bdb1-2c4692ce79ad</guid>
      <link>https://www.enkelmedia.se/blogg/2009/3/6/strippa-html-taggar-via-xslt-och-c-sharp?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Strippa HTML-taggar via XSLT och C-Sharp</title>
      <description>&lt;p&gt;När innehåll från en html-editor skall visas i listor eller i andra flöden kan det vara smidigt att "stippta" eller radera/filtrera bort HTML-taggar.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Alltså detta:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;&#xD;
&amp;lt;p&amp;gt;I´m here&amp;lt;/p&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Blir till:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;Hello World&#xD;
I´m here&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;Hur gör man då? Faktum är att lösningen är väldigt enkel. Jag skapade en egen c-sharp funktion som kör ett regex och sedan beräknar längden på inlägget för att veta om det skall kortas ned eller inte:&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&#xD;
&amp;lt;!DOCTYPE xsl:stylesheet [ &amp;lt;!ENTITY nbsp " "&amp;gt; ]&amp;gt;&#xD;
&amp;lt;xsl:stylesheet&#xD;
 version="1.0"&#xD;
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&#xD;
 xmlns:msxml="urn:schemas-microsoft-com:xslt"&#xD;
 xmlns:msxsl="urn:schemas-microsoft-com:xslt"&#xD;
 xmlns:umbraco.library="urn:umbraco.library"&#xD;
 xmlns:em="urn:em"&#xD;
 exclude-result-prefixes="msxml umbraco.library"&amp;gt;&#xD;
&#xD;
&#xD;
&amp;lt;xsl:output method="xml" omit-xml-declaration="yes" /&amp;gt;&#xD;
&#xD;
&amp;lt;xsl:param name="currentPage"/&amp;gt;&#xD;
&#xD;
&amp;lt;!-- ******* SCRIPTS STARTS HERE *********** --&amp;gt;&#xD;
&#xD;
&amp;lt;msxsl:script language="CSharp" implements-prefix="em"&amp;gt;&#xD;
&amp;lt;![CDATA[&#xD;
&#xD;
// Removes all HTML-taggs from parameter-string&#xD;
&#xD;
public string generatePreview(string strHTML) {&#xD;
 &#xD;
 // Setting default string-length&#xD;
 int intDefaultLength = 200;&#xD;
&#xD;
// Removing HTML-tags using regex&#xD;
 strHTML= Regex.Replace(strHTML, "&amp;lt;[^&amp;gt;]*&amp;gt;", String.Empty);&#xD;
&#xD;
 &#xD;
 if(strHTML.Length &amp;gt; intDefaultLength) {&#xD;
  return strHTML.Substring(0,intDefaultLength) + "...";&#xD;
 }&#xD;
 else {&#xD;
  return strHTML;&#xD;
 }&#xD;
}&#xD;
&#xD;
]]&amp;gt;&#xD;
&amp;lt;/msxsl:script&amp;gt;&#xD;
&#xD;
 &amp;lt;!-- ******* SCRIPTS ENDSHERE *********** --&amp;gt;&#xD;
&#xD;
 &#xD;
&#xD;
&amp;lt;xsl:template match="/"&amp;gt;&#xD;
&#xD;
&amp;lt;!-- The fun starts here --&amp;gt;&#xD;
&#xD;
&amp;lt;p&amp;gt;&amp;lt;xsl:value-of &#xD;
 select="em:generatePreview($currentPage/data [@alias = 'HTMLContent'])" &#xD;
 disable-output-escaping="yes"/&amp;gt;&amp;lt;/p&amp;gt;&#xD;
&#xD;
 &#xD;
&#xD;
&amp;lt;/xsl:template&amp;gt;&#xD;
&#xD;
&amp;lt;/xsl:stylesheet&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Självklart kan man,  om man vill skapa och kompilera sin egen extension till XSLT, då kan man ha med denna funktionalitet i sin extention. Detta är att föredra om man ska använda funktionen på många olika XSLT-mallar.&lt;/p&gt;</description>
      <pubDate>Fri, 06 Mar 2009 18:26:00 Z</pubDate>
      <a10:updated>2009-03-06T18:26:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">96b8d91f-a806-4a3a-933b-01538c0e510b</guid>
      <link>https://www.enkelmedia.se/blogg/2009/2/23/stilmallar-css-i-umbracos-editor?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Stilmallar/CSS i Umbracos editor</title>
      <description>&lt;p&gt;När man lägger till en ny stillmall (CSS) i Umbraco viasas den inte automatiskt när du redigerar innehåll i WYSIWYG-editorn TinyMCE.&lt;br /&gt; &lt;br /&gt; För att stillmallen ska "slå igenom" och synas i editorn måste man kryssa för stillmallen i developer-delen.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Gå till Developer&lt;/li&gt;&#xD;
&lt;li&gt;Öppna upp "Data Types" och klicka på "Richtext editor".&lt;/li&gt;&#xD;
&lt;li&gt;Kryssa i de stilmallar du vill ska synas i editorn under "Related stylesheets".&lt;/li&gt;&#xD;
&lt;li&gt;Spara och nu är det bara att köra.&lt;/li&gt;&#xD;
&lt;li&gt;TIPS: Skapa en speciallstillmall om du tex vill ha en annan bakgrund i editorn än på själva sidan. Denna stilmall använder endast i editorn, inte i själva HTML-koden.&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/3512/datatypes_richtext_css.jpg" width="493" height="216" alt="Datatypes _richtext _css"/&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 23 Feb 2009 15:41:00 Z</pubDate>
      <a10:updated>2009-02-23T15:41:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">bdb1046b-f2d2-4105-a4d7-46c951a824a3</guid>
      <link>https://www.enkelmedia.se/blogg/2009/2/23/classer-i-tinymce-editorns-dropdown?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Classer i TinyMCE editorns dropdown</title>
      <description>&lt;p&gt;Umbracos inbyggda texteditor "Richtext editor" som baseras på TinyMCE 3 har en dropdown som heter "Choose style".&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/3501/choose_style_dropdown.jpg" alt="Choose _style _dropdown" width="400" height="94" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Standardinställningen i TinyMCE är att alla klasser i de stillmallar som är bundna till editorn ska visas i dropdownen. Eftersom det oftast finns massa klasser i dessa stilmallar som man inte vill ska synas i listan har Umbraco en annan lösning.&lt;br /&gt;&lt;br /&gt;&lt;/em&gt; &lt;strong&gt;Så här fixar du en ny klass i listan "Choose style"&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Klicka dig till "Settings" och expandera "Stylesheets". Välj en av de stillmallar som visas i Umbracos Richtext editor.&lt;/li&gt;
&lt;li&gt;Högerklicka och välj "Create" för att skapa en ny under-klass.&lt;/li&gt;
&lt;li&gt;Döp den nya stilen till önskat namn, i rutan "styles" kan du sedan skriva CSS-markup.&lt;/li&gt;
&lt;li&gt;Denna markup syns inte automatiskt i editor, du måste också lägga till denna markup i din stillmall. I detta fell i mallen screen.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.enkelmedia.se/media/3496/choose_style_propertys.jpg" alt="Datatypes _richtext _css" width="416" height="397" /&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 23 Feb 2009 15:39:00 Z</pubDate>
      <a10:updated>2009-02-23T15:39:00Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">932a5032-4a98-4ec7-9985-8beb1dab750c</guid>
      <link>https://www.enkelmedia.se/blogg/2009/2/6/arbeta-med-umbraco-i-visual-studio-2008?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
      <title>Arbeta med Umbraco i Visual Studio 2008</title>
      <description>&lt;p&gt;Ett tips för dig som utvecklar umbraco-lösningar är såklart att använda Visual Studio.&lt;br /&gt; &lt;br /&gt; Umbraco har ju möjligheta att redigera XSLT, CSS, JavaScript och även HTML-mallar i sitt admingränsnitt.&lt;br /&gt; &lt;br /&gt; Däremot missar man ju debugging och mycket annat som kommer tillsammans med Visual Studio.&lt;br /&gt; Om du vill utveckla och debugga med Visual Studio 2008, gör såhär:&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;1. Skapa en ny Umbraco-installation&lt;/p&gt;&#xD;
&lt;p&gt;Ställ in databas-koppling, rättigheter osv. Filerna kan tex hamna i c:\inetpub\wwwroot\umbraco&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;2. Skapa ett nytt "Website Application Project"&lt;/p&gt;&#xD;
&lt;p&gt;Detta projekt ska skapas i en annan mapp än din umbraco installation.&lt;/p&gt;&#xD;
&lt;p&gt;Lägg till de mappar för de filer du vill kunna arbeta med. Jag har följande:&lt;br /&gt; &lt;br /&gt;     * /css&lt;br /&gt;     * /scripts&lt;br /&gt;     * /xslt&lt;br /&gt;     * /masterpages&lt;br /&gt;     * /usercontrols&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;3. Lägg till ett "Post Build Event"&lt;br /&gt; Detta körs efter att projektet har kompilerats. Syftet är att vi ska kopiera filerna från vår Web Application till vår Umbraco installation.&lt;br /&gt; &lt;br /&gt; Klicka på "Soulution&amp;gt;Properties&amp;gt;Build Events" och lägg till följande kod under "Post Build Events" - alltså det som sker när projektet är kompilerat.&lt;/p&gt;&#xD;
&lt;div id="CodeDiv" dir="ltr"&gt;&#xD;
&lt;pre class="brush: xml"&gt;XCOPY "$(ProjectDir)bin\$(ProjectName)*.*" "C:\Inetpub\soundforce - umbraco4\bin\" /y /S&#xD;
XCOPY "$(ProjectDir)usercontrols\*.ascx" "C:\Inetpub\soundforce - umbraco4\usercontrols\" /y /S&#xD;
XCOPY "$(ProjectDir)xslt\*.xslt" "C:\Inetpub\umbraco4\xslt\" /y /S&#xD;
XCOPY "$(ProjectDir)css\*.css" "C:\Inetpub\umbraco4\css\" /y /S&#xD;
XCOPY "$(ProjectDir)scripts\*.js" "C:\Inetpub\umbraco4\scripts\" /y /S&#xD;
XCOPY "$(ProjectDir)\*.pbd" "C:\Inetpub\umbraco4\" /y /S&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;Parametern /y gör att filer skrivs över, och /S att även underkataloger inkluderas.&lt;/p&gt;&#xD;
&lt;p&gt; &lt;/p&gt;&#xD;
&lt;p&gt;4. För att debuga&lt;br /&gt; &lt;br /&gt;     * Öppna siten i din webbläsrae&lt;br /&gt;     * I Visual Studio väljer du Debug &amp;gt; Attach to Process och väljer w3wp.exe från listan. (På IIS on XP/2000 heter proccesen asp_net.exe).&lt;br /&gt;     * Var noga med att *.pbd-filerna kopieras till umbraco-installationen.&lt;br /&gt;     * Debugga för fulla muggar!&lt;/p&gt;</description>
      <pubDate>Fri, 06 Feb 2009 20:16:00 Z</pubDate>
      <a10:updated>2009-02-06T20:16:00Z</a10:updated>
    </item>
  </channel>
</rss>