Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Content Tree Module, Orchard Core Admin UI experience renewal survey - This week in Orchard (06/06/2025)

This time, you can see a fascinating demo of the Content Tree Module! But first, let's look at our other topics, like adding GraphQL support for querying content items by status from the Content Picker Field, fixing binding form input in the Coming Soon theme, and improving the Register User Task. Don't forget to fill out our Orchard Core Admin UI experience renewal survey to help shape the future of Orchard Core!

Featured tags

IIS
API
SMS
SEO
MCP
All tags >

This week in Orchard - 9/28/2018

Check out our current post for a 2-hour long demo about how to add a new SaaS module for Orchard Core! On Orchard 1.x Styling the Orchard Tag Cloud so it looks like a cloud, not a list Robert Wray published a new post to his site about styling the Orchard Tag Cloud so it looks like a cloud, not a list. On Orchard Core Demos Predefined list, a new editor for the Text Field Now if you add a new Text Field to a content type, you have the option to choose the Predefined List type for the editor. In the Options textarea, you can predefine the allowed values using JSON. In this example we added a new Text Field to Article that has a Predefined List-typed editor. On the editor page of the Article content type you could see the Category Text Field that has the predefined options. It's a radio, but you can also choose the display to use a dropdown. See that we have one option with no value. We also haven't provided anything for the Default value. Setting the options by using JSON is not the best solution, so in the future we could define the available options as you can do it in Craft CMS. You can watch this demo and many other improvements in the recording of the latest Orchard Podcast! Implementing a SaaS module in Orchard Core Last Friday Sébastien showed us how to implement a SaaS module in Orchard Core. In the next few lines we would like to give you a short recap based on the 2-hour long video, that you can also find on YouTube! The concept The goal is to create a simple vertical application with a dedicated recipe. Take a look at Fabrik.io! Here the users can register and after a simple registration they can create their own sites (like in the case of DotNest as well). So the first step is to design the process how users can manage their profiles. This workflow could be a good one: User goes on the front page. User enters his/her information. User receives an email, and clicks the link to confirm the email address. User is registered in the default tenant. The site is created, and an email is sent with the URL of the site. We could also add other options for the users, like they could manage their information, profile and payments in the main tenant, on the front-end. In our demo users can enter an email address, the name of the site and a handle. After that they will get an email with a link that will create the site. If they click on the link, Orchard will create the new tenant and redirect the user to there. Create a new module in Orchard Core called OrchardCore.SaaS An easy way to add new module to Orchard Core is just to take an existing one from the OrchardCore.Modules folder and copy all of its content with a folder name that you want to add to your module. Then change the name of the csproj file. After fire up Visual Studio and Add an existing project to the OrchardCore.Modules folder which will be our new renamed project file. But you can also create a new module by adding a new Class Library (.NET Standard)-typed project to the solution. Before building the module don't forget to delete the App_Data folder from the OrchardCore.Cms.Web folder. You also need to reference the new module to the OrchardCore.Cms.Web project. Add a custom recipe to the module Pick an existing recipe and copy it to our module's Recipes folder. In our case the saas.recipe.json would be perfect, because we would like to do something similar. We need to change the name of the recipe (to do not have two recipes with the same name) and enable our module in the line 27 of this recipe. We also set the home page of our new site by setting the HomeRoute option and providing the route of the selected action. Implementation The heart and soul of our module is the HomeController. Here we have the RegisterUserViewModel to get the SiteName, the Handle and the Email from the user. If the ModelState is valid, we need to create a new instance of the ShellSettings. Here you have to provide the name, the connection string, the database provider and many other options. As you can see here we set a new tenant with the SQLite database and with the Blog recipe. The confirmation link in the email will contain every data that the user provided in the home page. For this don't forget to set up the SMTP settings. When the user clicks on the link in the email the Confirm action will take in place. Here we have to create a new SetupContext based on the information from the email, get the ShellSettings and pass this SetupContext to the SetupService to set up the site. You can see that for the sake of simplicity we are using hard-coded values for the username and password of the admin user. If everything go fine here, we redirect the user to the newly created site by using the value of the handle. We implemented this module based on Sébastien's demo and uploaded it to a GitHub repository, so feel free to explore the whole codebase of this project!

This week in Orchard - 9/21/2018

Check out our current post for loads of demos about Orchard Core and of course for a 2-hour long demo about how to use Orchard Core as a Decoupled CMS! On Orchard Core Demos Handling theme-less sites The Login page is now using the admin theme, not the frontend one. To do that, we need to use a custom layout, the Layout-Login.cshtml. See that this view is part of the TheAdmin theme. Also, at the bottom of the Active Themes menu you will find a section called Reset default themes. Here you can reset the site and the admin theme, that means there will be no layout injected in the view. This feature is useful for a Decoupled CMS. Icon picker editor Now Text Field has a new editor type, called Icon picker. If we would like to create a new content item that has a Text Field with an Icon picker editor, we will see a default heart icon. With the help of this editor you can select an icon from the Font Awesome icon set. You also have the ability to search an icon by typing its name. Security token to setup a new tenant When we create a new tenant, we can preselect a recipe like we can preselect the type of the database. By the past everybody can go to the setup screen of your tenant and set it up without having a permission to do that. Now, you have to click on the green Setup button near the name of the tenant in the Tenants page, that lets you access to the setup screen thanks to a security token. This token is also time limited. With this feature you can create tenants to users, send it by email and wait for them to set it up. Because the database and the recipe are preselected, the user cannot set the values of those when setting up a new site. You can also see the token in the Query string. Content picker field A new Content Picker Field is available for Orchard Core. When you add a new field to your content type, you can select the Content Picker Field type. Then you can choose which content types you want to display in this field and you can have a standard editor or select Lucene to search for a Lucene index. In a standard editor, you can select content items based on their DisplayText. You can watch these great demos in the recording of the latest Orchard Podcast! Using Orchard Core as a Decoupled CMS Last Friday Sébastien showed us how to use Orchard Core as a Decoupled CMS. In the next few lines we would like to give you a short recap based on the 2-hour long video, that you can also find on YouTube! The differences between Standard CMS, Headless CMS and Decupled CMS We have already talked about the different types of CMSs in a detailed way in this post, so for now just focus on what these differences means for Orchard Core. When we look at Standard CMS, what we see is that, when a website displays a page, it will use the ItemController in the OrchardCore.Content module. Inside that controller, there is a Display method, that takes a Content Item Id and renders that item whatever it is. Everything we see in an Orchard website is rendered by this exact action. With a Headless CMS, the CMS doesn't render anything in a frontend. It's just a set up APIs in terms of REST APIs, that you can query with HTTP protocol and then you get the result from these queries and then you do whatever you want with the content. In Orchard we have an ApiController in the same module which lets you to Get a Content Item and just returns the JSON document representing the Content Item.So, you can create a website, that you host somewhere and Orchard is hosted somewhere else. The first website just queries Orchard by asking to give me this Content Item and I will display it. There are most endpoints to get Content Items, like to do queries to list Content Items and so on. The Decoupled CMS is run as part of the CMS, but the CMS is not rendering the pages, it's your app or your web page that is rendering the pages. The communication between your pages and the CMS is in process using local APIs, compared to Headless CMS, where the communication is network communication. Create a new tenant to host content based on the Blank recipe The Blank site recipe creates a blank site with content management features. This will enable some features and the TheAdmin theme for the admin and nothing as the site theme. So, there is no selected theme for the frontend views. If you would like to access the admin site, you can do that, because the admin works correctly. This site has content management modules and in terms of Content Items, there is nothing. In terms of Content Types, there is nothing either, just the Menu and the Link Menu Item. Create a page on the web app directly You can just simply create a new Pages folder inside the OrchardCore.Cms.Web project (in the web application level) and inside that folder you can create a new file, like Foo.cshtml. The content of Foo.cshtml could be something like: @pageFoo Page After that if you go to https://localhost:44300/Foo, you can see it loads that page. It can be inside modules, and it will work too. If you add a page called Index.cshtml in the same folder, it will be your Home Page. Of course, you can define custom routes for your pages too. This is a kind of a Decoupled CMS, because we haven't used any theme for the frontend and not using any controller to display content. Decoupled theme As we mentioned earlier you have two different approaches when you build a new theme: You can construct the model first and create the theme. In this case you could have switchable themes for the precreated content. You can construct the theme first and then build the model. Let's create a theme based on the Modern Business one. First download it and copy everything to the wwwroot folder of OrchardCore.Cms.Web. If you type https://localhost:44300/index.html it will work, so now we have access to all static content. Making the static theme dynamic Copy the index.html file to our Pages folder and rename it to Index.cshtml. Don't forget to add the @page directive to the first line of the file. Then you can remove the static index.html file. So now if you visit your root URL, you will see your new home page. After that we can start make it dynamic. To do that you need to inject the OrchardHelper, that is an object which is usually available when we do a theme. @page@inject OrchardCore.IOrchardHelper Orchard<!DOCTYPE html><html lang="@Orchard.CultureName()">...</html> For the end of the demo you will have a Decoupled site where you can list Project and Service typed content items and also have a detail page for the Project content type. The Index page of the site contains two notable helpers: GetContentItemByAliasAsync: if your content type has an AliasPart attached, you can define an alias for it. You can get the content item based on the value of the alias. If you add a BagPart to that content item, you can query over the items of it in the view. GetRecentContentItemsByContentTypeAsync: you can get content items by the type using this helper. You can also provide the number, that how many items you would like to fetch. In the last screen you can see the detail page of the Project content type. Here we display the name of the Project. So if you are interested in how to get there, just watch the recording of the demo! On Lombiq Win a year of free custom domain usage: Still time to fill out the developer survey! As we've written about before, we ask you to tell us everything you wish DotNest would do differently. The DotNest developer survey is still on, but not for long: We'll close it on the 23rd. If you haven't filled it out here's the time, because you may also win a year of custom domain usage! So tell us your thoughts in the survey, enjoy an improved DotNest and win! DotNest is back in the Azure Marketplace - and it's in Microsoft AppSource! A while ago DotNest was part of the Azure Marketplace - and it's back again! Actually not just there, but also in the Microsoft AppSource catalog. The Azure Marketplace is mostly aimed at businesses already using Azure. AppSource is frequently utilized by any business users to source solutions for their needs, and we believe DotNest can provide a suitable platform for a lot of web-centric business use-cases. Having these two new offers published will help drive more people to DotNest and Orchard, strengthening our ecosystem. Do you know of somebody looking for a CMS, especially a hosted one? Ping them to check out these marketplace offers!

This week in Orchard - 9/14/2018

Check out our current post for the Dynamic compilation with C# 7.3 support in Orchard 1.x and for a lot of exciting Orchard Core improvements! On Orchard 1.x Demos Dynamic compilation with C# 7.3 First of all, let's mention two notion in a nutshell: Static view compilation: you can build your Razor files without needed to build the solution Dynamic compilation: you do not need to build your solution if you modify a cs file for example, you just need to hit save in your IDE and you can test your newly implemented features You can find dozens of documents about Static view compilation and Dynamic compilation in the web, so if you are interested in this topic just fire up a web search engine. Orchard 1.x not just supports dynamic compilation, but the Roslyn compiler has also been updated, so you can use the newest language features of C# that comes in the version 7.3. You can find a great demo about the Dynamic compilation in the latest Orchard podcast thanks to Benedek Farkas from Lombiq. In this demo he showed the working of the Static view compilation, the Dynamic compilation and he also overwrites a Razor file via FTP to a site that has been deployed to Microsoft Azure. On Orchard Core Crate a Font Awesome Icon Picker The idea is to create an editor for the TextField that would show a Font Awesome editor. In this page you can see an example for a dropdown where you can search and filter icons: https://farbelous.io/fontawesome-iconpicker/ David Ouwinga has an existing implementation for this feature in Orchard 1.x, that works in the following way: Show Login pages on the admin theme Last time we mentioned that the login controller (AccountController in OrchardCore.Users.Controllers) redirects us to a front-end page to login. Then it tries to find the theme and it will fail, because in a Decoupled CMS that is not necessary to have a shape. The login can't be decoupled right now, because it's completely coupled to the front-end. In WordPress, the Log In page has a different theme than the front end. Maybe Orchard Core could have the same approach here: have a different back-end theme for the Log In page. In this case when you design your front-end theme you should not have to care about to style the Log In page. User management: separate admin users and front-end users? When we authenticate on the Log In we can see all the users on the admin page. The users we show in the admin is a mix of the admin users (who has access to manage content) and the front-end users. Let's say we have an e-commerce site where we have customers. The question is should be the customers and the administrators of the site being stored in the same database/table and showing in the same list of users? Listen the conversation about the pros and cons of the concept of separating the admin and the front-end users at the end of the latest Orchard podcast! On Lombiq Win a year of free custom domain usage: Still time to fill out the developer survey! As we've written about before we ask you to tell us everything you wish DotNest would do differently. The DotNest developer survey is still on, but not for long: We'll close it on the 23rd. If you haven't filled it out here's the time, because you may also win a year of custom domain usage! So tell us your thoughts in the survey, enjoy an improved DotNest and win!

This week in Orchard - 9/11/2018

If you like demos, you will enjoy our current post! On Orchard 1.x Last time we mentioned that the next release of Orchard 1.x will arrive soon after the Dynamic Compilation will work with C# 7. Good news, now we have the PR that contains the changes that needed for the Dynamic Compilaton, thanks to Benedek Farkas from Lombiq! On Orchard Core Standard CMS, Headless CMS and Decoupled CMS At August 31, Sébastien gave a live demo about what's the difference between the Standard CMS, Headless CMS and Decoupled CMS. Standard CMS: With a traditional CMS (like Wordpress or Joomla) users create and edit their content through tools like a WYSIWYG editor or an HTML editor and save it to the back-end database. The CMS then displays the content according to the front-end delivery layer built into the CMS. A traditional CMS is sometimes referred to as a "coupled" CMS. This is what Orchard Core can do by default. You set a theme and then you get a website to edit the content. Headless CMS: If a traditional CMS was a body, the "head" would be the front-end components like the front-end framework and templating system. If you chop that head off, and you’re left with a headless CMS. A headless platform has no default front-end system to determine how the content is presented to the end user. Instead, it’s front-end agnostic, meaning that your content is raw and can be published anywhere, through any framework. So, you only edit the content and you access the data using REST APIs. With that you can create a static website, that calling the REST APIs. Decoupled CMS: With a decoupled CMS, your content is managed separately and is front-end agnostic, just like a headless CMS. Yet, it has front-end delivery tools in the box, like templates, if you want to use them. Remember when we chopped the "head" off a traditional CMS to make it headless? Well, imagine the same scenario here, except this time, we kept the head. It’s not attached to the main body as with a traditional CMS — but you aren’t totally left to your own devices when it comes to front-end delivery, like with a headless CMS, either. So, decoupled CMS is a mix of Standard CMS and Headless CMS. You can still edit the content using the CMS-part and you can render the website from the same web app, but the website you are rendering has been built by your own. You make all the pages that you will render, the CMS itself doesn't render anything, the front-end and back-end communicate to each other through calls to an API. With Orchard Core you can do all of this, you can render your site as a Standard CMS, as a Headless CMS or as a Decoupled CMS. The idea of that demo was to show some advanced content management even in the Decoupled CMS. So you can just simply create an ASP.NET MVC web app with some Razor pages and grabbing the content from content APIs and nothing more. @{ var query = await QueryManager.GetQueryAsync("Portfolio"); var results = (System.Collections.IEnumerable) await QueryManager.ExecuteQueryAsync(query);} @foreach(ContentItem Project project in results){ <a href="#">@project.Content.TitlePart.Title</a>} In this case, we made a SQL query, called Portfolio, that returns all the Portfolio content items. And for that each Portfolio content item we can render the properties in the markup. But there were issues, for example if you want to create new pages or edit the existing ones you always need to rebuild the solution. One of the biggest issue that it was not easy to reuse the services that are defined in OrchardCore helper. For example you can easily access the current culture like: <html lang="@OrchardCore.CultureName()"></html> It would be great to be able to use these helpers in the Decoupled CMS as well. The other big issue is about the login. The login controller redirects us to a front-end page to login. Then it tries to find the theme and it will fail, because there is no layout shape. The login can't be decoupled right now, because it's completely coupled to the front-end. Because of these issues, Sébastien will redo the same demo once he has the correct APIs and fixed the mentioned issues. We will publish the recording of that demo instead of this one. But if you are interested in this demo, just go ahead and ask Sébastien to share the link of that video with you. Demos Two new Orchard Core templates Marcos Aidos and Sijmen Koffeman created two new themes for Orchard Core using Liquid and on the latest Orchard community meeting they showed a demo about the Cafe Theme (Multipage website example) that is based on a StartBootstrap theme called Business Casual.The other one that you can find in the GitHub repository is called New Age theme. You have two different approaches when you build a new theme: You can construct the model first and create the theme. In this case you could have switchable themes for the precreated content. You can construct the theme first and then build the model. You can build your theme using Razor or Liquid. Both ways you will face with pros and cons: In Razor, the refences are mandatory, but you can write C# code in the templates. Razor is not safe, because its C#. If we let the admins or anyone to write Razor, we let them write C#. If we let them write C#, we let them to have access to everything. Liquid has "noise-free" templates, because there is no need to add references to your files. To use Liquid you have to learn the syntax of Liquid and implement your own helpers to be able to render the requested content in the layout. So, you only have access to the properties that are opted in, it’s like a sandbox. Webhook module You can watch a demo about how to use the new Webhooks module to post a message to a Discord channel when publishing Articles in Orchard Core. This module is still under development, so you will not find the code in the dev branch of Orchard Core. Facebook Login module With the help of this module you can authenticate yourself using Facebook. If you registered to Facebook and to the Orchard Core site with the same e-mail address, you have the ability to link these two account based on the e-mail address by the OpenId client. If the user doesn't exist in Orchard Core, it will create a new one based on the Facebook account's email address. This module is also under development, so you will not find the code in the dev branch of Orchard Core. On Lombiq Conference site with custom Bootstrap template - GPU Day case study The GPU Day conference series organized by the Wigner Research Centre for Physics of the Hungarian Academy of Sciences is dedicated to the fields of parallel and high-performance computing, visualization and data analysis in scientific and industrial applications. On the last three conferences Lombiq presented its cutting edge technology, called Hastlayer. The conference site was developed by Gábor Domonkos from Lombiq here on DotNest which is a great proof of how far you can get using only the built-in DotNest features and Media Theme for theming. If you are interested in the case study about the development of the GPU Day theme, don't forget to visit the DotNest blog! DotNest developer survey We at Lombiq want to make DotNest the best developer-focused Orchard hosting platform around and we can't thank you enough for taking the time to help us understand the best way to do that. If you would like to help us, please fill our short DotNest developer survey.

This week in Orchard - 8/30/2018

Good news for the beginners of Orchard Core! This week you could learn about how to build a new theme for Orchard Core from scratch! On Orchard 1.x If you haven't read the latest post: the latest version of Orchard 1.x (Orchard 1.10.2) released on Apr 27, 2017. The community fixed several bugs since then, so the next release of Orchard 1.x will be arrive soon. We would like to have a working Dynamic Compilation with C# 7 for the next version and Lombiq is working on this issue. After that, the community will release Orchard 1.10.3. On Orchard Core Field settings editors Orchard Core has several fields, for example the Enumeration Field. The issue with these kinds of fields was these fields would be like a new field just to be able to show different editors. For example, if you create a new text field you will be able to select the standard editor or the text area. They are extensibilities for this field to be able to get custom editors. In the case of the enumeration field the editor now is not sufficient, because the community wants to customize the editor itself. Maybe the editor could be a check box list, but sometimes it could be just a simple selection from multiple elements, but in the end, we just have one value, so it's really a text field with an editor that shows multiple possible value. What about having a new way when creating custom editors? Orchard Core introduces a new notion, called settings editors. Till now, you can select editors for your field that could have multiple type of editors. Then each editor might require settings to customize the UI of this editor. Now any field can be extended with custom editors and any module can provide custom editors for any type of fields. A field just need to focus what it stores and not about how its edited. So, editors should be about how do we edit different kind of fields. Let’s see a short demo to make this clear! Demos Field settings editors Let's have a content type called Article with a Subtitle Text Field. If we select the Multi-line option under the What type of editor should be used? dropdown, you will see a new option called Color. This is a setting for the editor. So, the content field itself is a text field, that has access to multiple type of editors and here Color is just an example here. Let's write red here. After that let's create a new Article. Here we can see the Subtitle field, that is multiline. When we type something here it will be red, because this editor will look at its settings to customize the rendering of the editor. The field editor settings are available in the fieldeditors branch. If you are interested about how the community implemented this feature or how you can create new field settings editors, watch the demo about the field editor settings in the recording of the latest Orchard Podcast. Building a theme for Orchard Core from scratch Let's see a possible way about creating a new theme for Orchard Core from scratch based on az existing Start Bootstrap theme, called the Creative theme. If you are using code generation, you can generate a new theme by typing dotnet new octheme -n "ThemeName.OrchardCore" as you can see it in the documentation. For this, you have to install the Orchard Core Cms templates by doing dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2-* You can also find this command in the same Read the Docs page. But for now, we will only just look at what is the content of an existing project file and simply copy it. To do that, fire up Visual Studio and add a new Class Library (.NET Standard) typed project to your OrchardCore.Themes folder, but don't forget that you can put it anywhere. You can delete the Class1.cs file. To do that, open the csproj file of a theme and overwrite the content of your csproj file with it. You can remove everything that doesn't exist now and just have the following project references: OrchardCore.Theme.Targets: this is require to mark the project as being a theme. It will include some properties that will make it a theme. OrchardCore.DisplayManagement: we will need it, because we will create views and we want to inherit from a Razor base view or will need some tools that are only in display management. Microsoft.AspNetCore.Mvc and Microsoft.AspNetCore.Mvc: we need those for Razor views. After that we need to create the Manifest.cs file. We can copy this file from an existing theme and modify it. The wwwroot folder will serve to store all the static files of this theme. So, add this folder to your project with the Views and Recipes folder. The web app won't be able to load any module that isn't referenced. So you have to add your project as a reference to OrchardCore.Cms.Web project. You can do it in a simple way by just adding a reference using Visual Studio's Add Reference... option. If you want to add a reference to a file that is inside the wwwroot folder, you have to prefix the path of the files with the name of the project. Change the theme to pick up dynamic content and dynamic assets The render_section Liquid tag It's easier to understand the working of the tags by an example: {% render_section "HeadMeta", required: false %} The tag will inject a resource that is needed to be injected, so this will include the HeadMeta. The required: false means that if nothing is injected that's fine, but required: true means there must be something or it will fail. In the lines above we just give you the first few steps about how to start to build your theme. If you are interested in how to create a new theme from scratch in Orchard Core, you should definitely watch Sébastien’s live demo about it. At the end of the video, you will have a great, brand new theme! By watching the recording, you will also learn more about the different Liquid tags that you can use in Orchard Core! On Lombiq DotNest developer survey We at Lombiq want to make DotNest the best developer-focused Orchard hosting platform around and we can't thank you enough for taking the time to help us understand the best way to do that. If you would like to help us, please fill our short DotNest developer survey.

This week in Orchard - 8/23/2018

Last week we had no 'This week in Orchard' post because of vacation, so in this post we will focus on the happenings of last week. And we have a lot to talk about so get ready for a longer post! On Orchard 1.x The latest version of Orchard 1.x (Orchard 1.10.2) released on Apr 27, 2017. The community fixed several bugs since then, so the next release of Orchard 1.x will be arrive soon. We would like to have a working Dynamic Compilation with C# 7 for the next version and Lombiq is working on this issue. After that, the community will release Orchard 1.10.3. On Orchard Core Culture settings A new, Culture object is available in all Liquid pages on top of the Site object. This represents the site's default culture as an ISO language code. Culture has Name, that is the request's culture as an ISO language code, for example: en-Us. The Dir property of the Culture object contains the text writing directionality, like rtl or nothing that is the default means left to right. We need to mention two helper methods here, that you can use in the Razor layouts of Orchard Core. The first one is the OrchardCore.CultureDir() With this method, you can set the value of the dir property. You can see an example in the Layout.cshtml file of the TheAdmin theme. <body class="preload" dir="@OrchardCore.CultureDir()"> ... </body> The second one is the OrcharCore.CultureName() that is used in the same file: <html lang="@OrchardCore.CultureName()"> Instead of typing CultureInfo.CurrentUICulture you can just simply use this method and this way you don't have to add a using to System.Globalaziation, OrchardCore.CultureName will be enough. Demos Resume theme for Orchard Core Antoine developed a new theme for Orchard Core, called Resume. You can download the new theme as a NuGet package and you can also test the theme here. Check out this site, that is using this theme here. If you are interested in the features of the new theme, check out the recording of last week's Orchard meeting from this point. MiniProfiler Scott Hanselman updated his PC and now can build Orchard Core in 7.2 seconds. MiniProfiler is a simple, but effective mini-profiler for .NET, Ruby, Go and Node.js. Now you have the ability to enable MiniProfiler for Orchard Core. After that you can see for instance the duration in ms that is needed to render the different parts of the site. With the help of the MiniProfiler you also have the ability to test the caching of your site. This feature is available on the sebros/1895 branch. Culture management improvements In a previous post we mention that how you can set up the default culture of your site. Now let's see the new features of Orchard Core's localization! Make sure you enabled the Localization module. The default culture will be used if the user didn't provide any information about the language that they use. When you host your site on localhost and reach that by an URL like: https://localhost:44300 you will see that the request header contains an accept-language: en-us. ASP.NET Core with the default configuration will look into this header and take it as a hint to find that language to use to render the page. It actually takes three elements into considerations by default: first its looking at the URL. If we say that: https://localhost:44300?culture=en-Us, it will take that in priority, because we explicitly asking for this page with the en-US culture. If we type: https://localhost:44300?culture=hu-HU and ask for Hungarian, we get the following when we see the page source, because we haven't set the site to support the Hungarian culture. Then let's go to the Configuration -> Settings -> General page using the Dashboard. Here you can manage the default cultures that your site supports. This list tells that this site is available in these languages. Let's add a supported culture for the site by clicking on the Add or remove supported cultures for the site link. Here select the hu-HU | Hungarian (Hungary) culture and hit Add. Also add the en-US | English (United States) culture to the list. Then go back to the General Settings page and hit Save. The site will restart for the settings to take effect. Now if you view the page source you will see the following value of the lang property: Your site now supports the Hungarian culture and Orchard can render you this page with the requested one. Let's see a more interesting sample! Let's add a culture that uses RTL writing, for instance the fa-IR | Persian (Iran) culture. After if you ask the page with the fa-IR culture, you can see other changes in the page source as well. For example, the body dir has the rtl value, that means we can customize the css files in the themes based on the direction of the writing. If you set up the site using the blog recipe you can also check out the correct format of the date. Don't forget to watch the recording of the whole Orchard Podcast for the full demos! Demoing the capabilities of Orchard Core Beta 2 Last Friday, Sébastien gives a nearly 2 hours long demo about the capabilities of Orchard Core! If you are new to Orchard Core and want an introductory overview about every notable features and goals you should check out his fantastic presentation! In the next lines we will give you a recap about the content of this presentation. A quick overview of the OrchardCore solution using the Solution Explorer of Visual Studio First, we have a quick overview of the OrchardCore solution using the Solution Explorer of Visual Studio. Under the src folder, there is an OrchardCore folder, that contains useful projects for every other module. OrchardCore.Module folder contains not CMS-specific projects. For example, the Admin site, deployment, sending emails is nothing to do with the CMS. All these modules can be reused in any other app. The OrchardCore.Modules.Cms folder contains content management specific modules, like managing content types, content fields, alias, autoroute to build routes dynamically, etc. The main difference is that now you can create any web application and just reference a package called OrchardCore.Application.Cms.Targets and that references all the projects and any other modules for the CMS. The OrchardCore.Application.Cms.Targets is a project that just references all the CMS projects and the themes we have. If you just want an MVC app, that is not a CMS, you should reference the OrchardCore.Application.Mvc.Targets project and then you won't have any CMS-specific modules, just the MVC logic to create an MVC modular app. The OrchardCore.Cms.Web is just a simple web app, that references the OrchardCore.Application.Cms.Targets project. Other difference here is that you can have modules and themes anywhere in the solution. Every project can be anywhere, there is no specific location to put the files, like Modules folder or Themes folder. The folders above are just solution folders, not physical folders. Bag Part After we fire the application, Sébastian shows the menu of Orchard Core and the content items and content types, that are generated using the Agency setup recipe. Here you can find the Landing Page content type, that has a Services part. This part is a named part, called bag part. A bag part is a content part that can contain other content items. If you check the Contained Content Types, you will see that this part can only contains Service content items. Live Preview in Orchard Core In Orchard Core, the content item editor has a Preview button. Just Ctrl+Click on this button and try to edit the content of any content item. You will see your changes instantly in the new window thanks to the live preview feature. Templates In Orchard Core you still have the ability to create Razor templates as you did it in Orchard 1.x. The themes called SafeMode, TheAdmin and TheTheme contains the familiar cshtml files. We can now make Liquid templates as you can see it in the case of the TheAgencyTheme or in the TheBlogTheme. You can create these files nearly with the same name convention as you did before in Orchard 1.x. But the TheAgencyTheme doesn't have a Content-Landingpage.liquid in the theme. Orchard Core has a module called Templates, that allows you to define front-end templates from the admin. If you navigate to Configuration -> Templates (and set up your site using the Agency recipe) you will see the template for the Landing Page content type. Here you can edit your template and also have the ability for the live preview! If you want to show what's available for instance in the Model.ContentItem.Content, you can simply render that using Liquid. The Liquid will output the JSON of the requested content and you can access every part of it directly without needing to save your template thanks to the live preview feature. If you define a template in the admin, it will overwrite everything that is defined in the file system. Running queries in Liquid pages Let's say you set up your site using the Blog recipe and created another new blog post to it with title 'A very impressive blog post'. If you have enabled the Queries and the SQL Queries module you can add a new query under the Queries menu of Content from the admin. Here we created a query called BlogPosts that will return every published content item with BlogPost content type. Check the tick near the Return documents checkbox. In this case the query will also return the documents (in this case blog posts) not just the DocumentIds. Now let's create a new Liquid page called Blog Posts where we will render the results of the previously created query. We have a Queries object available here that has access to all the defined queries. Using Liquid, we can iterate through the resulted items of our BlogPosts query. These are SQL queries, so everything that is available in SQL you can query on that. Flow Part A flow part is like a bag part, but for widgets. Widget is a content item that is rendered in some way in a page. A flow will let us display all the available widgets. Widget can be any content type that you define. Let's say we add a simple Html widget to a page with some content. The nice thing with the flow part that we can organize each widget on the flow of widgets. So, I can say it's justified, means it will take the full width of my page. In this case you can create pages based on pieces of contents and can organize them in columns. And we also have a widget called Container that is also a flow of things. You can create all the widgets that you want. For example, you can create a carousel widget that has a bag part of slides and then you can simply add more slides to it with your properties. Why do we need Liquid and Jint instead of Razor We use Liquid, because Razor is not safe, because its C#. If we let the admins or anyone to write Razor, we let them write C#. If we let them write C#, we let them to have access to everything. In Liquid you only have access to the properties that are opted in, so it’s like a sandbox. The Layers module lets you edit widgets, place them in zones across the site based on rules. The Blog recipe has one widget, called Footer which is applied using the Always rule. This rule has a simple expression: true. This is JavaScript, because it’s safe, we do not have to run C#. Orchard Core also uses JavaScript in the Workflows module, where all the scripting is done without C#. We haven't mention every aspect of the demo in the examples above, so we definitely suggest to take your time and watch the whole demo! There is a possibility that a new live demo about how to create a new theme from scratch in Orchard Core will come from Sébastien this Friday (Aug 24). If you are interested in taking part in the live demo, check out his Twitter for further information!

This week in Orchard - 8/9/2018

In the latest Orchard Podcast we have a demo about the improvements of the Deployment module and have a nice demo about the GraphQL feature of Orchard Core! On Orchard Core Deployment Last time we mentioned that you can run a recipe on a separate Orchard instance on another server. So, you can link two servers and the client can send a POST request to the remote machine. Then you can upload content to the different machine, like production from the staging. Now we have a refact about how the deployment steps were executed. The idea is that: when we create a deployment plan and execute it we generate a ZIP file, that could contain recipes, medias and anything else that you want to include in the ZIP file. This is how the content exporting works. After that we can send this package to any target. These targets are extensible, we could export it to a file for a browser to download it or to an endpoint, therefore we could send that package to another Orchard instance and we can define even more options, like we can send it to an FTP or to a Git repository. So, in this case you can easily create for example backups. Another instance can read these Git and FTP endpoints to download that and to make the intermediate server to get the deployments, so there are many ways to use that. Now the logic that imports the file are extracted, any module can do something when the package is imported. GraphQL By enabling the GraphQL module of Orchard Core, you have the ability to run GraphQL queries using the new GraphQL explorer from the dashboard under the Configuration menu. This feature isn't release ready yet, because for instance it cannot lists fields or Markdown yet, so if you want to try out the GraphQL, switch to the jsonapi branch. In the explorer everything based on metadata schema, that means you can introspect what you can query. Just hit CTRL+SPACE and you have access to everything you can query. The context menu shows all the available content types for you. Demos Deployment Let's see a short demo about the deployment! For this, we will run two Orchard Core instances on localhost. Let's image a scenario where we send packages from the staging server to the production environment using the deployment module. For this, you have to create a remote client on the production instance under the Content -> Import/Export -> Remote Clients menu. The remote client is what is able to execute a deployment plan by using a given URL, that could be: http://localhost:2919/Deployment/ImportSo, create a remote client with name "Production" and add an API key. Now you have to define a remote instance in the staging environment under the Remote Instances option. Remote instance is the instance where you want to upload the plan. You have to add the URL here that you can find on the other instance's Remote Clients page. You also have to use the same Client Name and Api Key here that you have defined earlier. After that you can create a Deployment Plan. Deployment plans have deployment steps where you can define the elements that you would like to export. For instance, by selecting the Content step you can export all the content items for the specified content types. For the Demo, I have selected to export every blog post. You have the ability to add other steps to your plan as well. Now if you click on Execute, you will see the available targets, where you can deploy your plan. If you select the Production (which is the name of the previously created remote instance), Orchard will deploy your selection to the Production instance. But if you choose the File Download target, you can also download a ZIP file, that contains a Recipe.json. And here comes the Package Import option under the Import/Export menu. GraphQL Let's see a simple demonstration about the capabilities of the GraphQL explorer! The following query will list you the blogposts with its created UTC, Title Part, owner, the path value of the Autoroute Part, etc. The contentItem() is a custom filter which let's you define a content item by it's ID and you will get the content item. You can also have queries here. For instance, recentBlogPosts is a query that was done in Lucene. On Orchard Harvest The latest conference was held in New York, February 2017. In the podcast, the community have a discussion about the next possible Orchard Harvest. There will be propably no Harvest this year, because the community needs to be more advanced with Orchard Core and then they can think about Harvest. Organizing a conference with a released and more powerful Orchard Core could be more interesting for people to take part in the event. Don't forget to watch the whole recording of this week's Orchard meeting!

This week in Orchard - 7/26/2018

Orchard Podcast is back with 3 demos about the new features of Orchard Core! On Orchard 1.x At this meeting, the community discussed the two new fixes that goes the dev branch of Orchard 1.x, that we have mentioned last week, thanks to Chaleomkiat Munkong. Firstly, he fixed an error in ContainerSettings while editor validating, that comes when attaching a ContainerPart to a content type that has too many parts inside and some of these parts has settings with input validation. When saving with invalid value, you will get an exception. You can see that fix here. This issue also comes up while validating the values of Date Time Fields, so now we also have a fix for that. On Orchard Core Demos This week we had 3 demos about the new features of Orchard Core. Notice that these features are under development, so you will not have these changes in the dev branch of Orchard Core. Having a UI when running setup recipes Now you have the ability to run setup recipes using the Dashboard. You can head to the Configuration/Recipes menu, where Orchard lists you the available recipes. When you click run, the system will execute the commands in the selected recipes. After the demo, the community have a discussion about the further improvements of this feature. That could be a very useful feature, if the admin would have the ability to pass parameters from the dashboard to the recipes, like in the ARM templates. That could be also a good improvement to have recipes like migrations. So, the users could write a migration in recipe files. YouTube Video field Let's say that you attached the YouTube Video field to the Page content type. When you edit the content definition of the Page, you have the ability to set the width and the height of the embedded YouTube video. And when you create a new Page, you can enter the embedded URL of that YouTube video. The next improvement could be to let the users insert the original YouTube video URL (just copy it from the address bar of the browser), because now they need to have the embedded URL pasted here. Default culture When you enable the Localization module, now you have the possibility to set the default culture of the current tenant using the General page of Settings. You can also add or remove different cultures to the tenant, like in the page below. If you are interested in every new commit of the dev branch, head to the GitHub repository of Orchard Core! You can also watch the whole recording of this week's Orchard meeting!

This week in Orchard - 7/19/2018

We have no Orchard meeting this week, but the development of Orchard continues. On Orchard 1.x We have two fixes in Orchard 1.x thanks to Chaleomkiat Munkong. Firstly, he fixed an error in ContainerSettings while editor validating, that comes when attaching a ContainerPart to a content type that has too many parts inside and some of these parts has settings with input validation. When saving with invalid value, you will get an exception. You can see that fix here. This issue also comes up while validating the values of Date Time Fields, so now we also have a fix for that. On Orchard Core Orchard Core has much more fixes and improvements since the latest post, so let’s check some of those. Matias fixed the content ownership on agency.recipe.json. If you head to the commit, you can realize that the values of the owner and author are no longer hardcoded null or admin, now that comes from the AdminUsername parameter. Antoine fixed an issue, where he set’s the value of the Font Awesome to version 4 on TheBlogTheme, because in the case of version 5, the brand icons need a fab prefix. Orchard Core has more detailed documentation than Orchard 1.x, and of course spelling and grammar issues could occur. In this commit Ryan fixed a huge amount of spelling and grammar issues of the documentation. If you are interested in every new commit of the dev branch, head to the GitHub repository of Orchard Core! On Lombiq Orchard Dojo Newsletter Maybe you haven’t heard about it yet: Lombiq announced the Orchard Dojo Newsletter. If you subscribe to this newsletter you will get an e-mail every time when a new post published to Orchard Dojo, including ‘This week in Orchard’ of course. So, if you want to keep up to date with Orchard news, subscribe to Lombiq’s Orchard Dojo Newsletter!