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

Featured tags

IIS
API
SMS
All tags >

This week in Orchard - 02/15/2019

The work on localization has been started for Orchard Core by implementing content item cloning. The Beta 3 release is almost ready too! On Orchard Core Orchard Core Beta 3 Only one issue left for the Beta 3 release of Orchard Core. Now the community can look into testing and shipping the new release of the CMS. Working on shell scopes When we do something in a request (if we use a database), at the end of request we want to commit the transaction that attached to the request. We are highly modular and event based, what can happen is that we do something with the content items, then all the modules can be called to do also something with a content item. But modules don't know what's happening on the content item between different components. One component might say that the content item is invalid, so don't save anything. But maybe a previous module tries to save something. That's why we have an ambient transaction for the full request and at the end of the request if everything went well (if no module said to cancel the transaction), the transaction will be committed. So, what we do is, at the end of the request we commit the transaction if nothing went bad. And we can do (because we need to commit the transaction at the end of the request) actions after all the things have been done. Maybe in a module we say do something after an action and then (after everything is stored in a database) do another thing. Or maybe we will have twenty events on the same thing, but we know we need to do a single thing at the end. So, we have the notion of DeferredTaskEngine. The IDeferredTaskEngine is a service, that you can resolve and add a task and it will do a deferred task. You pass an async lambda and what will happen is once the current unit of work or work context is done (in this case a request), once the scope DI has been disposed, then we create a new scope that will execute the deferred tasks. It's like enlisting another unit of work after the current one has been done. You can just enlist from any module. The issue we faced is that we would like to be able to do something before the unit of work is done, but just once. So, the same thing as the DeferredTaskEngine, but in the same scope and just once. For instance, let's have a look at the CreateTaskAsync method of the IndexingTaskManager. This method is called by modules when they want to create an indexing task. It's just: "OK, store a task for later!", that says we need to index this content item. So, during a request, you might want to import 10 content items and each of them will call CreateTaskAsync. But what we don't want to do is do a database call for each of them. What we want to do is: log the task into a local queue (_tasksQueue), and once the current unit of work is done (meaning the request), flush or save all the tasks to the database with one SQL command or with one communication to the database. To do that, we do a FlushAsync which is called with a DeferredTaskEngine. So, we load the DeferredTaskEngine, and we say add the task which is used to flush all the current queue. With that we can batch many things into one command. But this thing will be done in a different scope, so different transaction for the database. It would be great to do it in the same transaction as the request. The goal is that to be able to queue a task/job in the current request or in the current scope, or at the end of the scope and also in a separate scope. So, you could have the choice. Create OrchardCore.Profile Module for FE Users The goal is being to define profile pages for viewing and editing a profile of a user on the front end reusing the same composability of a UI for this specific entity, which is a user. So, we can edit the users in the admin for their security thing, but the profile could contain private info for the user perspective and that can be accessed from the front end. So, introduce custom editors for the front end, not using fields or parts or anything, but extensibility of the UI for the profiles. So, you can create modules that will add profile information to be displayed or to be edited on the frontend, like you address, your payment information, your orders and everything will be extensions to the profile module. Extends ServiceCollection to update env.WebRootFileProvider The asp-append-version Tag Helper is using the WebRootFileProvider file provider which is not correctly set, and doesn't find the files in modules, so it would not append the correct hash to the URL for the ASP.NET Tag Helper. The issue about it is here. Clone content items The goal is to implement localization and the first step is to support cloning. Thanks to JP Tissot, this feature is now ready. You will see a Clone option in the Actions drop-down list near every content item. If you hit Clone, a new version of the content item will be created and saved as a draft. The permalink of the cloned item will be auto-generated: if the content item has a permalink: blog/post-1, the clone will have blog/post-2 or about-1, if the original one has a permalink: about. Localize content items Here is a plan about how to the content item localization should be implemented in Orchard Core: a LocalizationPart is added to content types that can be translated. It will provide a custom UI element in the editor to navigate between translations of the same content item using a common identifier called Localization Set which is represented by a unique identifier share across all content items of the same set. Each LocalizationPart has a unique (Culture, LocalizationSet) tuple as a single translation of the same culture can exist in a localization set. The localization set identifier can generated the first time a content item is translated. A setting is added to all fields so they can be marked as "Culture Neutral", meaning their value cannot vary by culture. In practice when a content item is changed, the values of these fields are cloned on other versions (draft/published) of the same localization set. We synchronize them. Content handlers should have a Localizing event such that each part could define how its content should be localized. Some parts might need their content to be made unique (autoroute part) or copied (title) or translated automatically, or picked from other translated content (content picker). All these services, part and events should be in a Localization module, a Core and an Abstractions project. The ContentManagement module should not have to reference it. Any module which needs to handle localization in a specific way will reference the Abstractions project and implement custom handlers. On Lombiq New pics of our team members Some new pics of our team members are up! Head to lombiq.com/about-us for the photos and here you can see lot of Orchard and Orchard Core developers on one picture! If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 02/08/2019

This week in Orchard is here with several improvements and bug fixes for Orchard Core! Check out our post for the new Let's Encrypt module too! On Orchard Core Documentation for OrchardCore.Data The OrchardCore.Data module has got several fixes lately and gets a new documentation about how to create a new DbConnection instance, write database provider agnostic queries and so on. You can read the documentation on Read the Docs. Layer rule based on the request culture Orchard Core has some built-in rules that you can use to control the visibility of the widgets: widgets in the layer with isHomepage rule is only visible on the home page. to show widgets only for anonymus users use the isAnonymous rule. use isAuthenticated rule to show widgets for authenticated users. if you need a layer just for a given URL, you can use the url rule, where you can use the * expression, like: url("/mylist/page-*"), where the rule will be apply for any URL that starts with /mylist/page-. the new one is the culture rule that we at Lombiq contributed, that gets the culture used by the current thread and shows the widgets in the given layer. Let's say that the layer rule is the following: culture("fr"). In this case if the request culture is "fr" or "fr-CA", the widgets on this layer will be shown. Media module fixes and improvements If you open the Assets or try to insert media items using a WYSIWYG editor, in some cases the scroll bar doesn't appear, that is not so user friendly. A bigger problem was when a media folder has too many documents the Media Gallery tries to render/download them all thus causing the stack overflow exception. Now you will see the scroll bar. There is also a pager to navigate to the first/previous/next/last page of the items in a given folder. You can also set the page size by using a drop down. Demos Let's Encrypt module for Orchard Core By using the Let's Encrypt module we can get SSL certificates automatically when hosting your sites in Azure using Azure App Service. Support for other scenarios will come later. In the menu you will see a Let's Encrypt option with the submenu items: Azure Authentication and Certificates. Under Azure Authentication you can set up the necessary settings to talk to the Azure API to add the certificate and do the binding. Under the Certificates menu you can see the list of your bindings under Hostname SSL Bindings. When you click on the Request and install certificate button, you will get a new Let's Encrypt account with the email address typed in the Registration Email textbox. It also verifies that you own the hostnames and install the certificate to Azure then makes the bindings. The module is still in development and it will get more features in the future. Extension for indexing text fields in SQL A field indexation was added to be able to search for fields. For that there is a new TextFieldIndexProvider. Until now, when we want to do queries on the field data we have to use the Lucene queries, because only Lucene is indexing the field content. So, you could only use Lucene. If you want to do a filter screen to search for things you would have to enable Lucene and do a Lucene query to find the things. But you need Lucene and Lucene indexing to work. Sometimes you need to do SQL queries, because you have the data in SQL and it's easier, you do not have to use Lucene to do that. We didn't have the fields data inside tables that we can query, it's currently inside a JSON document, but not projected in tables so we can't query them. This PR contains a logic that when we save a content item, it will extract all the field content into specific tables for each field. So, each field will have its own index. The TextFieldIndexProvider is for when every time a content item is saved by YesSQL, it will look in this content item and if there is a field of type text, and for any field of type text on this content item, a new record will be created in the TextFieldIndex table with the values. If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 02/01/2019

Orchard Core gets a huge configuration change to move closer to the Beta 3 release! Check out our post for the latest news around Orchard Core and Lombiq! On Orchard Core First Step into Orchard Core We always happy if we find a new developer who wrote a post about Orchard Core. Chun Lin has a blog, called cuteprogramming and the end of last year he installed Orchard Core. PR called Adding Configuration support now merged Thanks to this PR, Orchard Core now supports custom configuration and it also removes YAML usage. We used to have YAML files for site settings, now it's JSON documents and it's the format of appsettings.json, like a standard .NET Core settings file. There is also a bunch of examples in the default appsettings.json file in the root of the OrchardCore.Cms.Web folder. The important thing to know is that everything which is specific to Orchard Core modules have to go in the OrchardCore section and then it's free to use any subsection inside that you want, so you could use a subsection based on each module (if you want) and decide what to put in there. There is no documentation for it for now, but it will come and we already mentioned these configuration changes 3 weeks ago in This week in Orchard. The Media module provides a good sample about how to use the configuration using appsettings.json and there is a Readme.md file to show this feature. Some of the hardcoded values and settings here are moved inside the appsettings. Check the Startup.cs file of this module. There is a DefaultSizes variable, that defines the list of the allowed values that you can pass in the width and height parameters of the URL of an image. If you try to resize an image to a size which is not part of this list, then it won't resize it. That's to prevent DDoS attacking websites by generating as many images as the user would. In the constructor, we are injecting the IShellConfiguration for the current tenant to get the section OrchardCore.Media and look for a section name called SupportedSizes and bind it to an array of integers. If it's not defined, we use the default ones. We do the same with the MaxBrowserCacheDays and MaxCacheDays values. On Lombiq Introducing our HipChat to Microsoft Teams Migration Utility If you're a user of Atlassian's chat service, HipChat, just like us, then you've surely heard that it'll be retired in February 2019. While Atlassian recommends and officially supports migrating to Slack what if you wanted to try Microsoft Teams instead? While there is no official support from Microsoft to migrate to Teams you can try our free and open source tool that we're released a month ago! Since the release we keep improving our utility and now have a v.0.3.0-beta release that means the app is now out of alpha. Note that this being a utility with just temporary use simplicity of implementation was favored against long-term maintainability. Note that the guide assumes you're using Windows but everything should work equally well under any OS supported by .NET Core. However, released executables are available only for Windows 64b currently. If you are interested in the app or the features it has, don't forget to read the Readme file in GitHub. Adding Visual Studio extension and training demo module references to index.md On the previous meetings we showed our Visual Studio Extension and the Training Demo Module. Now the Getting Started and the Visual Studio 2017 sections of Index.md file in the Orchard Core repository contains the references to inform the developers through the Orchard Core documentation too. Orchard Dojo Newsletter We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing 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. Do you know of other Orchard enthusiast who you think would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 01/25/2019

Interested in a new website built in Orchard Core? Or the status of the Beta 3 release? Or you want to learn how to develop in Orchard Core? Well, it will be definitely your post! On Orchard Core Add 'where' filter to standard filters in Liquid If you go the GitHub page of the Liquid markup language, you could see a new merged pull request, with title: Add 'where' filter to standard filters. As you can read here: users of Liquid will often wish to filter an array to only those items that match a certain criteria. For example, showing "pinned" messages at the top of a list. If you want to filter products based on a property, you can pass a property and the list that you want to filter on, something like: {{ products | where: "category", "kitchen" }} You can optionally past a second value, which will be the value you want to test on. So, it's like the where statement in LINQ, but in Liquid. And this filter now is also part of Orchard Core. Left issues for Orchard Core Beta 3 The scheduled release date of the Beta 3 version of Orchard Core was December 2018, but the community still facing new and important issues that must be fixed to ship a more stable CMS. You can check the open issues marked for the Beta 3 release here. If you feel the energy inside you and would like to help the community to ship Beta 3 as soon as possible, feel free to pick one or more from the open issues! The current open issues are the following: A new website using Orchard Core Joinery Products has a new website which runs on Orchard Core! Check out this site to see the loads of capabilities that you can achieve using the CMS. If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier it is now maintained by our team at Lombiq Technologies. Localized Orchard Core Documentation If you visit the page of the official Orchard Core Documentation in Read the Docs, you could notice the appearance of a new language: the French. Thanks to Antoine Griffard, the new localized documentation of Orchard Core is in progress! On Lombiq Orchard Core Training Demo module Orchard Core Training Demo module is a demo Orchard Core module for training purposes guiding you to become an Orchard developer. You can use this module as part of a vanilla Orchard Core source that including the full source code - which is the recommended way. You can use it as part of a solution the uses Orchard Core NuGet packages, however, it's harder to look under the hood of Orchard Core features. The module assumes that you have a good understanding of basic Orchard concepts, and that you can get around the Orchard admin area (the official documentation may help you with that). You should also be familiar with how to use Visual Studio and write C#, as well as the concepts of ASP.NET Core MVC. Bug reports, feature requests and comments are warmly welcome, please do so via GitHub. Feel free to send pull requests too, no matter which source repository you choose for this purpose. Fresh new theme of TryOrchard.net Try Orchard! is a showcase for the Orchard content management framework: you can try how Orchard feels by checking out an already running demo site where you can play with Orchard as you wish. Now this site has a new look, check out the fresh new theme at https://tryorchard.net/. If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 01/18/2019

This week is about to improve the new Try Orchard Core, therefore new features added to Orchard Core to manage tenants. And of course, the Lombiq Orchard Visual Studio Extension got a huge update! On Orchard Core Health Check module There is a new endpoint "health/live", that returns different statutes based on the health of the system. This could be very useful when you run Orchard in multiple nodes. To test this feature don't forget to enable the Health Check module. Status of Orchard Core Beta 3 To see the open issues left for the Beta 3 release of Orchard Core, head to the GitHub repository of Orchard Core and search for the open issues labeled with the beta3 milestone. Demos Tenants management improvements The way of managing the tenants are improved with many new features. Now you can filter the tenants by their states and names, and sort them by the name and the state. You have the ability to bulk enable/disable tenants. Pagination also added to this page when you have more than 10 tenants. In the following screen you can see we have the Default tenant and tenants with names Tenant1-Tenant12. You can see the added filters, actions and pagination. Try Orchard Core improvements Try Orchard Core has a new URL https://try.orchardproject.net/ and has a slightly new index page. When you create a demo site you can see a thumbnail for the recipe instead of a list. Another improvement is that the new demo site is only setup when you click on the "Setup your site by opening this link." link in the received email. On Lombiq Lombiq Orchard Visual Studio Extension This is a Visual Studio extension with many features and templates frequently used by Lombiq developers. Contains Orchard-related (including Orchard Core) as well as generic goodies. This extension has an Orchard Log Watcher feature, that alerts you when you have any new entry in the log file. When you install this extension, you will see a new button on the Orchard Log Watcher toolbar. The button of this toolbar will be enabled when you have unread entries in the error log files. If you click on this button, the log file will be opened with the editor assigned to open .log files. When you navigate to Tools -> Options -> Lombiq Orchard Visual Studio Extension -> Orchard Log Watcher you can enable or disable this feature. You can also set the log file folder path. The path can be anything, so, you can set custom paths as well. The default path here supports the default path of the log files in the case of an Orchard Core and an Orchard 1.x solution too. Another great feature of this extension is the dependency injector. First, select the Tools -> Inject dependency... option. When you start to type the name of the dependency that you want to inject, the autocomplete feature will suggest you from some of the most used dependency names. In the following screen we injected the IAuthorizer to an AdminController. At the bottom of the windows you can see a little preview about the new code, that will be added to your controller. You can generate short field name by ticking the Generate short field name checkbox. In this case the field and the parameter name will be consist of the uppercase letters of the dependency. In the following example, the field and the parameter name will be _wca and wca for the IWorkContextAccessor. Here you can download this free, open source extension. In GitHub you can find the extension's Readme with release notes too. Also, if you encountered bugs or have a feature request please add it on the GitHub page as well. If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 01/11/2019

We had no meeting since the 18th of December so, now we have a lot of improvements to talk about regarding Orchard Core. Let's see them one by one! On Orchard Core Fixing configuration issues The idea is to fix the configuration issues of Orchard Core. The first one is about to provide a per-tenant configuration. When you have multiple tenants, you might want them to behave differently in terms of connection strings, Azure Blob Storage connection strings, SMTP settings, whatever that can be set in configuration. Before this PR, there were no way to define configuration to each tenant. Now we have a way to define configuration per tenant. The next issue is about to reimplement FileShellSettingsConfigurationProvider. If you are not using the CMS, the default provider for the tenant names is in the tenants.json file. It was using the configuration API to load it, which is not the way it should be done. The Orchard environmental settings discussion is about when you have different environments (production, test, development) and you want to able to define different settings, even site settings or configuration settings. This PR is fixing it. Here we want to be able to define configuration by environment, like production, test and so on. Also, to define configuration per environment variables. So, when you switch to different environments, they will take that into account. Finally, the use JSON for site settings is about to use JSON instead of YAML for site settings. This PR also removes the usage of YAML. How do these works? Let's see that in a demo! Demos Fixing configuration issues Set up a site using the Software as a Service recipe, because we will create tenants. Now head to the App_Data folder! Before this every site had a folder and a site settings file inside (Settings.txt). The first thing you will see here is the tenants.json file, that lists all the tenants. The content of the tenants.json file could be the following. This JSON document contains the name of the tenants and its properties. The properties you can have inside this file are State, UrlPrefix, RequestHost and Features. If you go to the Default folder inside Sites, you will find an appsettings.json file instead of Settings.txt. The only configuration it has so far is the DatabaseProvider, which in this case is Sqlite. So, the tenants.json now is common to every Orchard Core instance, the appsettings.json will contain only the things that are specific to a tenant. Now let's create a new tenant based on a different recipe, for example the Blog. Just create it, do not set up it yet. Then open the tenants.json again. You can see that here we have the new tenant created. Now, let's set up this tenant and see the content of the appsettings.json inside the Sites/Blog folder. Furthermore, you can also have an appsettings.json file under the App_Data folder that will apply configuration properties for all the tenants. You can also define configuration properties under the OrchardCore.Cms.Web folder as well, but this one will never be updated by the application, because it's not accessible. If you want to define custom settings here for all the modules, you can create a section called OrchardCore and inside that you can add custom settings under the name of the module. Now open the Startup.cs file of the OrchardCore.Media.Azure module. You can see that it will resolve an IShellConfiguration. It's a new interface, which is implementing IConfiguration, but only gets the configuration for this tenant. If you need to get the configuration for the app itself, you need to resolve IConfiguration. In the current example we configure the MediaBlobStorageOptions, using the configuration in the section called OrchardCore.Media.Azure. If you want to define some custom value for a specific tenant (don't forget that the appsettings.json file in the OrchardCore.Cms.Web folder provides app-level settings) you have two options. First, you can create a new section in this file with the name of the tenant and can repeat the modified settings that you would like to add to the current tenant. Here you could see, that the configuration for the email module in app-level is different than in the tenant-level. The other way is to define this in the appsettings.json file of the tenant (under App_Data/Sites/Default) in the same format. You can also have appsettings.json files per environment. You can create appsettings.production.json and appsettings.staging.json files. We also support environment variables. You can create an environment variable that looks like ORCHARDCORE__STAGING__Orchard.Media.Azure__ConnectionString. There are some bugs to fix before merge these changes to the dev branch. Until that you can find the code in the sebros/configuration branch. New Text Field editors In the following PR Antoine Griffard added new Text Field editors to Orchard Core: Email editor Color editor Tel editor URL editor We created a new content type, called TextFieldEditorDemo and added four Text Fields to it to show the four different kind of editors. New admin menu The new admin menu for Orchard Core now works perfectly on mobile as well. Response Compression module By enabling the Response Compression module, it will compress the response from the server using GZIP or BR (if your client supports it) and set the max-age value of the Cache-Control in the header. The media files will be cached for 7 days in the client. Also cache static files for a year as they are coming from embedded resources and should not vary. Let's look the response headers when loading the clean-blog.css file. Here you can see the max-age property was set for the Cache-Control, that is important for the performance. Try Orchard Core Thanks to Antoine Griffard, the Beta version of Try Orchard Core is available, where you can create an Orchard Core application choosing between the Agency, Blog and Coming Soon recipes. To set up a new site you have to provide your e-mail address and the name of the site. After that you will receive an email that contains the URL of your tenant, the username and the password of the admin user. Note that the sites will be reset every Monday at 00:00 GMT. If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

This week in Orchard - 01/04/2019

Happy New Year everyone! The first Tuesday of this year was the 1st of January, therefore we had no meeting this time. So, now we have a great opportunity to summarize the latest posts of 2018 around Orchard Core! On Orchard Core Orchard Core CMS GraphQL using GraphiQL One of the biggest features of Orchard Core that was developed in 2018 is the GraphQL. By following David Hayden's post, you can get a great tutorial about how to use this feature with the The Agency Theme to query all the Landing Page Content Items and display their titles (displayText), or to query the PortFolio BagPart, which is a collection of Project Content Items. If you haven't deal with GraphQL yet, it's a great opportunity to try it out! Custom Color Picker TextField Editor Orchard Core has a number of built-in TextField editors: Standard, Multi-line, Icon Picker, and Predefined List. In this post, you could read about how to develop a custom text editor: a color picker. The custom editor uses the Spectrum jQuery Color Picker to choose and display colors. Recipe Migrations How to develop a custom module that creates a Bootstrap 4 Card Widget using Recipe Migrations? If you want to use Recipe Migrations, you will need to create a class that inherits from the DataMigration class (similar to using IContentDefinitionManager) and uses the new IRecipeMigrator interface to execute your recipe migration files. Don't forget to put your migration file in a folder called Migrations. Want to see some code and the details of the development? Then you should read the whole post! Working with Taxonomies One of the biggest features of the upcoming Beta 3 release of Orchard Core is the Taxonomies module. By following David Hayden's latest post, you can have a great knowledge about the phrases introduced by this module, like Taxonomy Term Type, Taxonomy Field, Term Content Type and so on. After summarizing the definitions, you could read about how to add a Taxonomy Field to a custom content type and displaying the Taxonomy Terms. At the end of the post you could see how the GraphQL displays the Term Content Items. Adding Google Analytics to Orchard Core In this quick and easy blog post Chris Hammond shows you how to add Google Analytics to Orchard Core by using a widget and inserting the JavaScript code there. Test your new desktop build by building Orchard Core! You might remember that last summer Scott Hanselman built the Ultimate Developer PC 3.0 and test its capabilities by compiling Orchard Core both "cold" and "warm". Jan de Vries did the same a few days ago when testing his "Ultimate Developer PC". Want to know the results? Head to his blog for more details! If you would like to read more exciting blog posts about Orchard and Orchard Core, don't forget to check out Orchard Blogs: the heartbeat of the Orchard CMS community: blog posts from Orchard-related blogs, scraped automatically. Created by Lombiq. On Lombiq Orchard Dojo Newsletter We have started this newsletter to inform the community around Orchard with the latest news about the platform. We want to preserve this tradition in 2019 as well. By subscribing 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. Do you know of other Orchard enthusiast who you think would like to read our weekly articles? Tell them to subscribe here!

This week in Orchard - 12/21/2018

The last This week in Orchard for this year is here. Let's see the latest news around Orchard Core and Lombiq! On Orchard Core Fix modules that don't correctly use PathBase-relative root paths Many modules - like the setup module - reference CSS and JS files using root-relative paths. E.g.: <link type="text/css" rel="stylesheet" href="/OrchardCore.Setup/Styles/setup.min.css" /> Sadly, this doesn't work (at all) when hosting your application under a virtual path (for instance, http://localhost/orchard). To fix that, all the assets should be referenced using the PathBase-relative syntax (~/). E.g.: <link type="text/css" rel="stylesheet" href="~/OrchardCore.Setup/Styles/setup.min.css" /> In this case, MVC will correctly compute the asset URL based on the PathBase defined by the IIS integration middleware. Mobile friendliness issues There are issues with mobile view. First of all, the list actions are not responsive. Here you can see the list of the blog. Here we should move the icons to have more space for the title. The asset management if wider than the view. The landscape mode of the Media is overflowing on the right without a scrollbar. The navigation doesn't provide scrolling. The menu here is going far below, but there is no way to tap to the items. By using the Device Mode in Chrome DevTools to simulate mobile devices, you can choose to render your site with low-end devices. It was taking 10 seconds to load the css, 10 seconds to load jQuery, that means the site on those devices are quite unusable. What can we do? We don't have any compression middleware active. To solve this issue, we need to set the cache headers on the static assets in the future. Antoine Griffard's new site Antoine Griffard started to develop his personal site by using Orchard Core! Check out the site! On Lombiq Introducing our HipChat to Microsoft Teams Migration Utility If you're a user of Atlassian's chat service, HipChat, just like us, then you've surely heard that it'll be retired in February 2019. While Atlassian recommends and officially supports migrating to Slack what if you wanted to try Microsoft Teams instead? While there is no offical support from Microsoft to migrate to Teams you can try our free and open source tool that we're releasing just now! Let us know how it works for you and if you can contribute with bug reports, feature requests or code that would be awesome! Grab the HipChat to Microsoft Teams Migration Utility from GitHub! Orchard Dojo Newsletter Now we have 32 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing 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. Do you know of other Orchard enthusiast who you think would like to read our weekly articles? Tell them to subscribe here! And don't forget to watch the recording of the last Orchard Podcast of 2018 on YouTube! Lombiq Technologies wishes a Merry Christmas and a Happy New Year to the readers of This week in Orchard! See you on the 4th of January!

This week in Orchard - 12/14/2018

Interested in the new admin menu and the new Gulp pipeline of Orchard Core? Or the current status of the Beta 3 release? Then let's have a quick recap about the current news around Orchard! On Orchard Core Status of Beta 3 If you would like to help with Beta 3 (or just curious about the issues left), you could navigate to the issues on GitHub and filter by the milestone beta3. Here you will only see the issues that are needed to done to ship Beta 3. Demos New admin menu When you checkout to branch skrypt/#2767 and setup your site using the Blog recipe, you could find a predefined Admin Tree, under Configuration -> Admin Trees, called Admin tree from blog recipe. When you edit a node, you can set the selection priority, that is the priority of this link to be displayed as active instead of another one when both are pointing to the same URL. The link with the highest value has the active status in the navigation. So, if you go on a URL and two menu items match this URL (that is possible, because we have admin nodes and we might go to the same page from two different nodes in the menu), the priority would define which one is selected. The position order of the link in the admin menu. When we want to have a priority over another module, we just need to set the position and if the menu has no priority we wouldn't head to a position. If you navigate to the AdminMenu.cs of the OrchardCore.Features module, you could see that the Configuration menu has a predefined priority here with the value 1. This feature is under development and will change and improve in the future. New Gulp pipeline We have a Package.json file in the root of the repository, which contains all the packages and node modules that we need. If you want to build the script, you do npm install and it will install all the modules from Packages.json. That's the standard npm behavior. You can do gulp build, which will look for all the Assets.json file and build all the assets for each module that they require. You have to do that only if you change or add some js/scss/etc. files. The gulp rebuild will rebuild everything, not just the changed files. The gulp watch will run a background task and as soon as you change a js/scss/etc. file, it will rebuild automatically the dependent assets. It's very useful when you are developing. Now with the new change, the Package.json contains all the module specific dependencies that we know of Orchard Core. Let's see for example the package.json file in the OrchardCore.Apis.GraphQL module (the first dependency). You could see that this one depends on 4 node modules, for example react and react-dom. Now head to the Assets.json of this module. This file builds some output resources from the Assets folder. But now (because we use the package.json in each module) we can point to the node modules at the root level (because we know that the package.json in our module will resolve these) to build output resources. They will be copied in the wwwroot folder as well. On Lombiq Migrating a standalone Orchard site to DotNest - Show Orchard case study Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier it is now maintained by our team at Lombiq Technologies. Our first task was to migrate it to DotNest, so here we are, see how we did it using basic Orchard features and Media Theme. Here's a case study with code on how we did it with. New sites added to Show Orchard Added a couple of Orchard and Orchard Core sites to the collection in Show Orchard! Check them out at the top showorchard.com. Send in your exemplary Orchard sites to [email protected] and we'll publish them too! For the full demos don't forget to watch the recording of the current podcast!

This week in Orchard - 12/07/2018

Let's have a recap about the demos of the new editor for the Media Field and the working of how to authenticate users with Microsoft Account. Don't forget to check the issues left for the Beta 3 release! On Orchard Core Render property in GraphQL to render content items We can use GraphQL to render a content item. The way it works is the following: blogPost { displayText, render(layout: false, displayType: summary), displayUrl, autoroute { path }} Now you can call render, and the result of render will be the HTML of rendering this blog post including the layout. The community intend to add features like passing false value for the layout, in this case we do not have layout. Or displayType to render as a summary. We can get the display URL of the blog post by using displayUrl. By having that we can do some static site generation even with or without a full CMS, because from the client script (that could be a mobile application as well) you will be able to ask all the blog post and render it. It will need more things and more processors, but that the start to have this kind of support. You can find this feature in the render branch. Issues left for the Beta 3 release The community wants to schedule Beta 3 with .NET Core 2.2, that has now shipped. Now the community should focus on fixing the P0 and P1 issues and the ones that are marked with the beta3 milestone. After they have been closed, Beta 3 will be shippable. Feel free to pick one and help the community to release Beta 3 sooner! Demos New editor for the Media Field The idea is to add a new editor for the Media Field to solve a special use case to manage your media/content item. The assets will isolated in the navigation, so you don't see them in there, they are only editable from the content item. If you add a new Media Field to your content type, you can choose to have a Limited: No media browser (will have a new name) editor type. Normally when you create a new content item from a type that has a Media Field attached, you can browse media items from the Media Library. In the limited one, you can just upload one from your file system and Orchard takes care of the handling the files that you upload. It means these files have a path (that consist of the segments of the content item ID) like in the image below to do not hit the limit the number of the files in a specific folder, and only users who have the right permission can manage these files through the Assets. This feature is still under development, so will might change and improve in the future. Authenticate with Microsoft Account Head to the Microsoft Registration Portal and register a new application. We must add a new platform here, let's choose Web option and enter the URL that the middleware will listen to. It could be the default Orchard Core HTTPS URL with the default callback path: https://localhost:44300/t1/signin-microsoft. We also need to generate password by clicking on the Generate New Password button. Go back to our admin portal and enable the Users Registration (if you want to add a new user) and Microsoft Account Authentication modules. Then head to the Microsoft Authentication -> Microsoft Account menu to add the AppId and the Secret Key from the Microsoft Registration Portal. Now in the login screen you will see a new option to Use another service to log in. If you click on the Microsoft Account button, you can enter the credentials of your Microsoft Account. After you need to let this app to access your info. If you click on the Yes button, you will see the Create a new account screen, where the Username and Email boxes are filled with the credentials of your Microsoft Account. Here you need to register, because there is no name in the claims that we could retrieve the proposed username. Now if you log off with this user and go to the admin panel you will see that the user has been created and it's on the list. You can also authenticate users with their Azure Active Directory Account by enabling the Microsoft Azure Active Directory Authentication module. You can fill the form based on the parameters of your Azure AD App registration under the Microsoft Authentication -> Azure Active Directory option. Now you can log in using the External Logins option from Orchard the same as we did before. You can read more about how the Microsoft Authentication works in Read The Docs! For the full demos don't forget to watch the recording of the current podcast!