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

Featured tags

IIS
API
SMS
SEO
All tags >

GitHub Actions, Media Slugify - This week in Orchard (18/12/2020)

This time you could see two great demos in our post! One is about the GitHub Actions integration for Orchard Core and the other one is about a new addition for YesSql. But first, let's check out the latest improvements of Orchard Core, like the new Media Slugify feature or the Synchronization Latency Option! Orchard Core updates How to enable Razor templates in my theme? It's just a few additional lines to the Orchard Core documentation, but we thought we should mention this change because it's a very common mistake that developers would like to use Razor in their custom themes instead of Liquid but the Razor code in the cshtml files doesn't do anything. New feature to slugify media folders and files to make them SEO-friendly Let's set up your site using the Blog recipe then navigate to the admin UI of Orchard Core. Head to Configuration -> Features to find the new one, called Media Slugify, and enable it. The media slugify module slugifies new folders and files to make them SEO-friendly. Now navigate to Content -> Media Library and try to upload something to the Media Library. And let's say that the name of the file that you would like to upload is something like this is a Szép kép.jpg. You can see that the filename contains several spaces and some special chars too. If you upload this image, the feature will slugify the name of the image and the result will be this-is-a-szep-kep.jpg. And the same applies to the folder names too. Check out the following gif to see what will happen if you upload files and create a folder with special characters when the module is disabled or enabled. If you would like to read more about this new feature, this will be your page on the Orchard Core documentation. Using Docker with Orchard Core Orchard Core's source code repository includes a Dockerfile which will allow you to create your own Docker images and containers. It can be quite useful for Orchard Core developers when needing to test PR's. It allows them to deploy locally quickly in some testing environments. There is a new page in the Orchard Core documentation with examples that will be shown for that context. Docker can also be used for more complex usage (ex: production deployment) but this documentation doesn't aim to explain that in detail. For more advanced examples we strongly suggest reading docker and docker-compose documentation. Synchronization Latency Option This is about being able to set how long you are OK to wait before refreshing your document cache. Let's say you have multi-node and the document updates on one node. It will be in the Redis cache, but you don't check for the new values every request, we can just say this is the grace period for which I don't want to check the cache. Like I would only check it every second even if I have one million requests per second, one million times we will get the value from the cache, but the next one will say: OK, I need to get something to be refreshed from the Redis cache. It was set to one second by default. Check the GetInternalAsync method of the DocumentManager, where we get the SynchronizationLatency property of the DocumentOptions. You can set the values of the DocumentOption using app settings. Demos GitHub Actions GitHub Actions allows you to use service containers, so basically just loading a Docker image and exposing it as a service to your main container that runs your tests. This is basically the same as Docker Compose when you have multiple containers running concurrently. What's need is that by using the Orchard environment variables, be able to run the functional tests for each database type to make sure the CMS works on all of those. If you open up the GitHub repository of Orchard Core, you will find several yml files in the .github/workflows folder. The one you can see here is called functional_all_db.yml that runs the functional tests on all databases. The first job here will run the Cypress script called mvc:test on the latest version of Ubuntu. If you aren't familiar with Cypress and Cypress test, you could see a demo about that in this This week in Orchard post. And there are a lot more tests in the workflows folder, check them out if you are interested in running tests! To run the actions manually, we can go to the Actions tab of the GitHub repository of Orchard Core where you can see all the workflows defined in these yml files, like Release - CI, Functional Tests - all Databases, etc. Select the Functional Tests - all Databases one and then click one of the results to see the actual jobs. And you can see all the steps in the job with the time it needed to complete with detailed execution results. And there are a lot more to see and speak about here. If you would like to know more, you should definitely check out this recording on YouTube! YesSql: Fixing subclass support Let's navigate to the GitHub repository of YesSql and open the CoreTests.cs file in the test/YesSql.Test folder and find the ShouldQuerySubClasses unit test. Here you can see a Circle and a Square class, these are both inherit from Shape. After we are creating some new instances of the Circle and Shape we do some queries and say give me the Squares and Circles. The new thing is in this line: Assert.Equal(3, await session.Query<Shape, ShapeIndex>(filterType: false).CountAsync()); Here we say list all the Shape types. And there will be three of them: two Squares and one Circle. So, now you can query by the base type to get inheritance inside that and it was not working before. And in this case, the index is just to store the name of the type that you are storing, just to be sure that it's the correct type. If you would like to see the recording of this new feature, head to YouTube now! News from the community Our full Orchard Core tutorial series, the Dojo Course 3 is here! After a long wait, the new Orchard Core version of our legendary Dojo Course tutorial series is here, the Dojo Course 3! Are you a newcomer and want to learn Orchard Core from the ground up, both from a user's and a developer's perspective? Are you somewhat familiar with Orchard Core but would like to get up to speed and become an Orchard pro? Look no further, check out Dojo Course 3! Dojo Course 3 guides you from the very basics of Orchard Core all up to be able to write your own themes and modules, utilizing various APIs of Orchard. We're publishing a tutorial video every day for 40 days starting on 1 December. So, this is your 40 days of Orchard :). And now we have published every video that is about the admin UI features of Orchard Core. From video 19., we will check the structural overview of the Orchard Core source, and then we will start coding! If you are really interested in the coding part, the upcoming 20 videos are specially for you. If you're looking for our previous Orchard 1.x tutorial series check out Dojo Course 2. A new website using Orchard Core: Cornish Mining World Heritage Explore what World Heritage Site status is and why the Cornwall and west Devon mining landscapes have this globally important designation. 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. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 176 subscribers! 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

New full_text Liquid Filter, Media Field improvements - This week in Orchard (14/11/2020)

See the improvements of the Media Field, the new full_text Liquid Filter, the enhancements of the admin UI, and many more in our upcoming post! Orchard Core updates ListContent Permission as Content Type dynamic permission Install your Orchard Core site with the Blog recipe and head to the admin UI. Navigate to the Security -> Roles and hit Edit near one of the roles. Type list in the search box that will list you some new permissions: the new ListContent permission on each Content Type. However, the global ListContent permission is of course priority over these. That means now you can decide which content items you want to list to the users in the given roles by using this dynamic permission. New full_text Liquid Filter Now there is a new Liquid filter called full_text. This lets you extract the full-text aspect of a content item. A full-text aspect being like metadata that we can get from any content item to represent it as full text. The goal being to be able to define custom full text for custom content types that will themselves use a full text of subitems. Let's say you have a Bag Part and you want to make your full text comprised of every full text of the items that you have in the Bag Part. To do that you can do a foreach on every item in the Bag Part and then you can call into their full text to provide it. Sticky bars on top while scrolling Last week we mentioned that the Features page has a new sticky bar on scrolling for very long pages instead of the scroll to top button. The good news is now more and more pages get this sticky bar on the admin UI. The Content Types page (Content -> Content Definition -> Content Types), the Content Parts page (Content -> Content Definition -> Content Parts), the Tenants page (Configuration -> Tenants), the Users page (Security -> Users), and the Recipes page (Configuration -> Recipes) are now also have a sticky bar. Fix double encoding of non-HTML strings in feed You can use the PopulateAsync method of the CommonFeedItemBuilder to build the RSS feed items using your content items. The RSS feed items have several properties like the link, guid, title, description, and so on. When we set the value of the title by calling the feedItem.Element.SetElementValue, the text that we pass will be encoded, so we don't need to encode it again, otherwise, we get it encoded twice. The same issue has been fixed in the ListFeedQuery feed query provider too. Initializing Liquid Include Filter There is an Include tag in Liquid that allows you to include an external Liquid file and in Fluid it's available through a FileProvider property, and in this case, the FileProvider property of the ILiquidFileProviderAccessor will be assigned to the LiquidTemplateContext. That means you can use it in your modules and your embedded assets. But how can you use that Include filter? Include your Liquid file using the {% include "Areas/TheBlogTheme/Views/Test" %} expression. This will include the Test.liquid file from the Views folder of the Blog theme. Demos New Media Field option to encrypt the image processing query string You could see a demo last week about the new options for Media Field where you can set the alt text of your image and you can also crop your images using a nice media crop picker. The way it was working is it's putting different kinds of options to the query string that allows you to manipulate your image. Let's see the following URL for an example: https://localhost:44300/media/post-bg.jpg?width=1&height=600&rmode=crop&rxy=0.2,0.5. Here you can see we set the width and height of the image from the media library. We also set the resize mode for the processed image with other parameters as well. Now there is a new bool option added to the MediaOptions called UseTokenizedQueryString to encrypt the image processing query string to prevent disc filling. That's true by default so you can try it out right away! To do that just simply open the predefined blog post and view the page source in your browser. Find the header HTML tag, where you can see how Orchard Core sets the URL of the background image. And that's not all of it! If you would like to know more about this feature, don't forget to check out this recording on YouTube! Orchard Core OpenID Connect Code Flow Api BlazorWASM We mentioned the Blazing Orchard project two weeks ago here in This week in Orchard that is a modular application framework that turns your Blazor project into a CMS-powered Blazor application by leveraging Orchard Core as a decoupled backend/CMS server using its REST & GraphQL APIs. In this demo, you will see a solution, that contains an updated version of Blazing Orchard that also contains OpenID Connect Authentication! Head to YouTube now to see the recording of this demo! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 169 subscribers! 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

Distributed cache, Media crop picker - This week in Orchard (08/11/2020)

This week we will see the new IDocumentStore, which is a cacheable, committable, and cancellable document store allowing to get documents from a shared cache. And don't forget to watch a demo about how you can add an alt text and crop the images of your Media Field! Orchard Core updates Make features actions sticky while scrolling If you navigate to the admin UI of Orchard Core and head to Configuration -> Features, you will see all of the currently available features of Orchard Core. This list is now getting longer and longer, so the idea here is to use a sticky bar on scrolling for very long pages instead of the scroll to top button. The first page that gets this sticky bar is the Features page, which looks like the following now. Edit button for lists in DetailAdmin view This is a feature that was already there in Orchard 1. When you want to edit something in the admin, you can return a route to the controller that will edit an entity. Or that will display it as a list or display it as a detailed object in the admin. And when you have a list, you have two options. Either you want to show all the content of this list or you want to actually edit the list itself. And to do that, when you see a blog and you click the link of the blog in the content items, it will go to the list of blog posts. This is the DetailAdmin view. And if you actually want to edit the blog you need to click on the edit button. This feature is about adding a new button for the list and you are now not confused about clicking the link or click in the properties button. Move feeds to feature There is a new feature now in Orchard Core called Feeds. Don't forget to enable that module if you would like to have feeds capabilities on your site! Generate xml documentation (comments) for nuget packages Whatever documentation we put on the files, they were not available, because if you don't put the GenerateDocumentationFile tag then it's not generated in the XML file that contains all the documentation, it's not embedded into NuGet, and Visual Studio won't load it. You need that to export your API docs. Not even to generate documentation, just to be able to have it in the NuGet package for the IntelliSense. If you don't do the NoWarn, every public member that doesn't have an API doc would fail the build. The <NoWarn>$(NoWarn);CS1591</NoWarn> removes the warning that some public members do not have comments. Now you will have more documentation when they use the NuGet packages to build sites! Distributed cache Whenever you want some cacheable document that is stored in the storage using YesSq for instance you need to inject the IDocumentStore interface. This will use YesSql to load the document and it will be able to cache it. So, for instance, if you would like to get the site settings you can use the IDocumentStore to do that because it's stored as a document and you want to cache it. And then when you load the site settings using IDocumentStore by passing the type, you can say GetOrCreateImmutableAsync or GetOrCreateMutableAsync. Mutable meaning that when you load the site settings just to read it, you want to say I want an immutable object. And when you want to load the site settings to update it, then use the GetOrCreateMutableAsync method. The difference is in the way that it will either cache it or not and also would it take it from the cache or not, or put it back in the cache or not. Or invalidate the entry in the cache. And there is the IFileDocumentStore which has the same methods as the IDocumentStore, but it's a totally different service. This one can be used to store a document on the file system that can be also cached. But it's a different store. We use the IFileDocumentStore to store the content type definitions. Demos Media crop picker and Alt text editor Set up your site using the Blog recipe. That recipe comes with the Blog Post content type that has the Banner Image Media Field by default. Let's check out the predefined blog post content item to see the new features of the Media Field. If you select the post-bg.jpg image and click on the button with the speech bubble icon, you can set the alt text for the image. Another new button is doing a more interesting thing. If you click on the button with the target cross icon, another new modal window will open where you can select the anchor for the selected image. Using the target cross, you can easily specify the crop point of the image. If you open the preview in another window you can easily see the changes of the image in real-time. But how you can enable/disable these options? Navigate to Content -> Content Definition -> Content Types and hit Edit near the Blog Post and edit the Banner Image settings. Here you will find two new options. One is about allowing alt text and one is to allow the center cropping. These are on by default, that's why you could see the mentioned buttons when you edit the media field. And that's not all! If you would like to know more about this feature don't forget to check out this recording on YouTube! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 172 subscribers! 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

Media Profiles, Renamed SummaryAdmin shapes - This week in Orchard (16/10/2020)

Media profiles feature to Orchard Core that allows you to defined preset image resizing and formatting commands! Renamed SummaryAdmin shapes, and new routes to avoid features URL blocking by IIS, and a lot more in our current post! Orchard Core updates Prevent disabling or removing administrator role Let's say you set up your Orchard Core site using the admin as the user name and for some reason, you navigate to Security -> Users to disable your own account. The problem here is that in this case, you are the only user with an Administrator role in the system. From now you can't do that, you will get a warning message saying you cannot disable the only administrator. Go back and edit your own user again and try to edit the user name too. This also triggers a new validation error, because you cannot modify the user name of the currently logged-in user. The last thing here is about removing the Administrator role from your user account. You could do that, but if your user is the only user with the Administrator role assigned, you will get a warning message about you cannot remove the Administrator role from the only administrator. Avoid features URL blocking by IIS IIS has some default filters for security like you can't have specific words in the URL. There are a few words used by us too like .sitemap. IIS also blocks any request ending in .resources by default. The list of blocked extensions includes a bunch of other terms that could conceivably be used in feature IDs such as .master, .browser, .config, .skin, etc. It's possible to override this behavior in the web.config file but this would have to be done on a per-application basis and carries unwanted security implications. The solution is just to put these parts in a different segment. If you want to enable a feature the URL to do that was:https://localhost:5501/Admin/Features/Enable/OrchardCore.Sitemaps Now the new URL is:https://localhost:44300/Admin/Features/OrchardCore.Sitemaps/Enable So the goal of this fix is to use the pattern Admin/Features/{id}/Enable in place of Admin/Features/Enable/{id}. The same goes for when you want to disable a feature. Renamed SummaryAdmin shapes of ContentsDriver These shape names are not compatible when defining custom placement, so they have been renamed. They are admin shapes, so the impact is quite low. If you have your own custom theme and redefined these ones you have to change them. So, the ContentsDriver creates four shapes with different shape types. Shape("Contents_SummaryAdmin__Tags", new ContentItemViewModel(model)).Location("SummaryAdmin", "Tags:10"), Shape("Contents_SummaryAdmin__Meta", new ContentItemViewModel(model)).Location("SummaryAdmin", "Meta:20"), Shape("Contents_SummaryAdmin__Button__Edit", new ContentItemViewModel(model)).Location("SummaryAdmin", "Actions:10"), Shape("Contents_SummaryAdmin__Button__Actions", new ContentItemViewModel(model)).Location("SummaryAdmin", "ActionsMenu:10") However, the actual shape type is considered before __ i.e. all the above shapes are resolved to the same shape type Contents_SummaryAdmin. Renamed these shapes as following to apply a unique placement record for each shape. Contents_SummaryAdmin__Tags renamed to ContentsTags_SummaryAdminContents_SummaryAdmin__Meta renamed to ContentsMeta_SummaryAdminContents_SummaryAdmin__Button__Edit renamed to ContentsButtonEdit_SummaryAdminContents_SummaryAdmin__Button__Actions renamed to ContentsButtonActions_SummaryAdmin So that placement will target a single shape type. { "ContentsButtonActions_SummaryAdmin": [ { "shape":"ContentsButtonEditNoView_SummaryAdmin" } ] } Demos New ImageSharp.Web Features ImageSharp is a new, fully-featured, fully managed, cross-platform, 2D graphics library. Designed to simplify image processing, ImageSharp brings you an incredibly powerful yet beautifully simple API. With the v1.0., ImageSharp has got a bunch of new features and it's now a lot faster. And Orchard Core is also using ImageSharp to work with images. New features included: Format support to the Tag Helpers/Liquid Filters: The slight weirdness with adding this is the file extension on the URL will remain .png, but the image will be returned with the correct mime/type. Quality support to jpg encoding and Tag Helpers/Liquid Filters: The Quality support allows you to specify a quality % to jpg encoding. Note: only jpg encoding is supported, but the Format support allows you to convert an image from saying png to jpg, and then reduce the quality. CurrentCulture/InvariantCulture for query string parameters: Supported through custom ImageSharp configuration, but not integrated into Orchard Core. Basing this decision primarily on the idea that most of our resizing/processing query string building, is done through templates, which are culture invariant. And that's not all of it! There is now a new Media profiles feature in Orchard Core that allowing you to specify resizing options and much other stuff. A profile can then be called with the profile name resize_url: profile: 'banner' rather than having to specify all the resizing options that may apply. But that's enough talk for now, let's see them in action, after all, we are in the Demos section of This week in Orchard, right? Use the latest nightly build of Orchard Core and set up your site using the Agency recipe. Then navigate to the admin UI where you will see a new option in the menu (make sure to enable the Media profiles feature): Configuration -> Media -> Media Profiles. Media Profiles are quite simple, they just have the standard resizing options that we have in ImageSharp. Notice that here you can set the width and the height values only from the supported ones. We add the name md to this media profile, let's note it, we will need it right away. Now navigate to Design -> Templates and edit the predefined Content__LandingPage Liquid template. We will use the newly created image profile when displaying the portfolio images. Just a note here: the home page in this agency is a LandingPage content type that has several Bag Parts attached. The one with the display name Portfolio is about to add Project content types to your LandingPage content type. And the Project content type has a Media Field attached, called Image. In this Liquid template, we will use our newly created md media profile. Here we say use the md media profile when displaying these images and in this particular case we would like to override the resize mode for the processed image. Instead of crop, we would like to stretch these images, but just in this case. When you define a media profile, you can say I don't want to specify the width, the height or the resize mode. In that case, you can set them in your Liquid helper, just as you could do that before. Now, let's just check out how does the home page of our site looks like. Remember that we set a lot of values when setting up our md media profile and we also set the quality percentage for the processed image and we set it as 10. We also change the width and height values and override the resize mode to stretch the images. This result is low quality stretched images in the Portfolio section. Now let's see the source code of this page and check out the img tags using the DevTools of Chrome. As you can see it's not tied to ImageSharp, the logic just converts the media profile into a good query string. This means we can do the override easier and if we change the values the URL will change, and it breaks the cache. When you would like to show the kittens.jpg with 100 width and 100 height, by using the crop resize mode (that resizes the image using the same functionality as max then removes any image area falling outside the bounds of its container) and use only 50% as the quality when compressing the image you would write a Liquid filter like this: {{ 'animals/kittens.jpg' | asset_url | resize_url: width:100, height:240, mode:'crop', quality: 50, format:'jpg' }} The documentation is also updated to help you how to use these new arguments. Don't forget to head to YouTube and watch the recording of this awesome feature! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 162 subscribers! 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

New custom filters in Fluid, Media options admin page - This week in Orchard (02/10/2020)

We prepared two interesting demos for this week: The first one is about having new useful custom filters in Liquid to make formatting numbers and string easier. The other upcoming feature is about how you can show your settings from your appsettings.json files without having the need to open these files in your file system. Orchard Core updates Restrict Content Type Admin Menus to only create the specified Content Type Several issues fixed regarding creating content items from the admin UI: Restored the new button specific to each content item when user filters by content type or accesses the content item list interface by link for a single content type in the admin menu. Fixed the behavior of the admin menu's links to Menus and Content Items: if they are not defined inside a recipe, they have a dynamic behavior and it causes an issue if the user defines a link for a specific content type inside the admin menu. In the BlogTheme, the Content Items link of the admin menu is defined in the recipe and doesn't have dynamic behavior. See the following GIF here where you can also see the creation of a new content type admin menu node that is about to list the Article content items. The new button under the new Article menu option is just about to create new Article content items. Update Blob Storage to search folder hierarchies The problem is that the method that is responsible to handle Blob Storage items does not correctly implement the includeSubDirectories = true option - it never did. This is because it's not like a normal file system where you can make one request and list everything, so it would have to make recursive requests for every directory it finds. Ironically the media step driver does this recursion already itself, but the recipe step does not when using Include All Media. So the short term workaround should be to specify the attached fields' folder's media fields, rather than Include All Media when creating the step. This issue withincludeSubDirectories = true affects this step, and the GraphQL media query - it's the only place we use it. So, Blob storage never handled searching subfolders correctly, so this should now work for the media step, and better in GraphQL queries (behaves identically to normal file system now). Now if you would like to get the content of the directory including subfolders too, the GetDirectoryContentFlatAsync method in the BlobFileStore class will return the files inside the subfolders too. Rename Smtp admin menu to Email The goal of renaming Smtp to Email is to make sure that you can edit settings related to sending emails even if you don't know what SMTP is (and this screen is also for testing email sending). Toggle password visibility on the login form and on the setup screen The login form and the setup screen now support toggling the password visibility, so can make sure that you typed the correct passwords in these textboxes. Demos Media options admin page In the appsettings.json file, you can define your media-related settings, e.g. change the list of allowed file extensions or the path used when serving media assets. The documentation includes all the default configuration values that can be overridden. The goal of this feature is to have a read-only version of the settings where you can see these configuration values without needing to navigate to your appsettings.json file to see the configured values. Head to YouTube to check out this short recording about this upcoming feature! New custom filters in Fluid Fluid is an open-source .NET templating engine that is as close as possible to the Liquid template language. It's a secure template language that is also very accessible for non-programmer audiences. It also contains an ASP.NET Core MVC View Engine. And of course, Orchard Core is using Fluid too to generate templates. If you would like to render numbers correctly, Fluid just renders them in a format 124456789, but you could not format it like for example 12,445.68 )(and you can't do it in Liquid by default either). We already had the format_date helper in Fluid where we can use the .NET formats, so the new helpers added are format_number and format_string, which are using the .NET format methods. They are not standard in Liquid, but there is nothing in Liquid to help achieving these. format_number: It will format the number with the current culture. If you pass "N", which means number in the standard numeric format strings, then it will use the number format that we have just mentioned above. So, to generate 12,445.68 from the 12445.6789 value, you can do that like 12445.6789 | format_number: "N" You can find a documentation about the standard numeric format strings here. format_string: In this case, you can pass a string with a String.Format inside and after using the format_string you can pass the values. Let's say you have the following expression: "hello {0} {1:C}" | format_string: "world" 123. This would be rendered as hello world $123.00. Notice that here we also used the currency ("C") format specifier to convert a number to a string that represents a currency amount. The documentation of Fluid contains the available custom filters where you can learn more about the other features of Fluid too. Head to YouTube to check out the recording about the new custom filters! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 161 subscribers! 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

Pager with page size, refactor IContentAliasManager to IContentHandleManager - This week in Orchard (25/09/2020)

Several great features and fixes were added to Orchard Core this week! You could see a fix for an interesting issue about how you can use XSS in an SVG file, the new IContentHandleManager, and two great demos! One is about the upcoming Pager with the page size, then check out the improvements of the Shape Components! Orchard Core updates Media Content Security Policy There was a Stored Cross-site Scripting security breach through the upload of a malicious SVG file, containing malicious JavaScript code, that is then executed whenever a user tries to view the contents of the uploaded file. In order to replicate this issue, you just needed to follow the steps described below: Create an SVG file with malicious JavaScript: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> <script type="text/javascript"> alert(1); </script> </svg> In the Media Library, upload the file you just created. Locate the uploaded file in the Media Library and select View. Observe that a JavaScript alert popup is triggered. To prevent that the fix is to add a new security policy. This means the browser will render the SVG without executing the inline scripts. The Media.StaticFileOptions is now slightly more configurable with services.PostConfigure to allow more fine-grained controlled, if any wants to adapt the event handlers and/or use them to block certain types of requests, or whatever they feel they need to. You can see the changes in the MediaOptionsConfiguration where the DefaultContentSecurityPolicy stores the value of the content security policy header. Refactor IContentAliasManager to IContentHandleManager This is about refactoring the IContentAliasManager and associated providers to be referred to as handle. From now you will see new extension methods: Orchard.GetContentItemIdByAlias("my-alias"); Orchard.GetContentItemIdBySlug("blog/post-1"); Orchard.GetContentItemIdByHandle("slug:blog/post-1"); and generally refactors everything else that referred to as an alias as a handle. It will not break anything, because it's keeping the IContentAliasManager and registering it to resolve the IContentHandleManager. The IContentAliasManager is not obsoleted to prevent compilations errors. But we could also just drop it completely in the near future. The IContentAliasProvider however has been renamed to IContentHandleProvider with no cross resolving. Now let's see an example to make this change clear. Let's say you have a content type that has the AliasPart attached. Every alias has a pattern, which is generated by the DisplayText of the content item: {{ Model.ContentItem | display_text | slugify }} So, if you create a new content item of this content type with a display text My new content item, your alias will be my-new-content-item. OK, now we have this content item. Let's say we need to get this content item and modify some properties of it from code. But how can we get this content item? Well, you can use the default implementation of the IContentAliasManager to do that: var myContentItem = await _contentAliasManager.GetContentItemIdAsync("alias:my-new-content-item"); Notice that here we need to pass the alias: string also because we would like to get a content item by an alias. From now we can use IContentHandleManager instead of the IContentAliasManager in the following way: var myContentItem = await _contentHandleManager.GetContentItemIdAsync("alias:my-new-content-item"); The GetContentItemIdAsync method of the IContentHandleManager iterates through all of the IContentHandleProver implementations and we have an AliasPartContentHandleProvider, that checks if the handle starts with the alias: string, and if yes, it returns the content item by using the AliasPartIndex table. As we mentioned you have new extension methods to use in your Razor code. The GetContentItemIdByHandleAsync is now just about calling the same IContentHandleManager implementation as we showed you above. Configure cookie lifetime for CulturePicker The issue was about you cannot change the expiration of the content localization cookies. By default, the cookie lifetime is set to 14 days, but if you would like to set it to 1 day, you couldn't do that until now. If you open the appsettings.json file in the OrchardCore.Cms.Web, you will find an OrchardCore_ContentLocalization_CulturePicker section there. Just uncomment that lines and use the CookieLifeTime to set the culture picker cookie lifetime in days. Demos Pager with page size If you have ever worked with an Orchard 1.x site, you may have seen how does the pager looks like at the bottom of the lists, like when you are on the page that shows you the contents list. It shows you the total number of items, the current page where you are right now, and you can also set how many items you would like to see on each page. It's slightly the same in Orchard Core too. The only difference is here that you don't have the option to set how many items you would like to see on the current page. If you navigate to Configuration -> Settings -> General you will see an option called Page size, but that's about saying 'I would like to see 10 items in every page'. You can't set the page size of the current page near the pagers. Antoine Griffard decided to start working on this feature for Orchard Core too. If you enabled the Tenants feature and navigate to Configuration -> Tenants, you will see the first prototype of this feature on that page. We have 11 tenants in the system and we set the page size to 10. In this case, the pager shows two pages and you can see the number 10 here as well. There is also a recording that shows you this feature, head to YouTube to know more! Shape Components updates Two weeks ago we wrote about a great upcoming feature to Orchard Core about having Shape Components. Let's think about a shape like a reusable component, like a view component in ASP.NET, but like an Orchard shape component, that can be reused. The development on that feature is continuing, this time you could see making the Razor Tag Helpers a little bit more feel like a component. Watch this recording on YouTube to see the current state of this upcoming feature! News from the community Blogs posts about Shortcodes, Shortcode Templates, and Shortcode Delegates I think we don't need to introduce David Hayden to the Orchard community. David Hayden is primarily a C#, .NET and Orchard CMS Developer with 20 years experience developing ASP.NET Websites and related technologies. David is currently primarily focusing on .NET Core, Orchard Core, and Orchard Core CMS for building modular, multi-tenant web applications and websites. He recently published two new posts in his blog about Shortcodes and Shortcode Templates in Orchard Core CMS and Shortcode Delegates. If you would like to learn more about Shortcodes or you haven't heard about them yet, it's definitely worth to check out these articles! But don't forget that you can find two videos on YouTube about Shortcodes: check out this one first, then watch this video for the second part of the demo! We also mentioned these features in This week in Orchard too several times. Check out this for an introduction, then this one for the first demo, finally don't forget to read this post to see the improvements of the Shortcodes! And the documentation is available in this URL! Orchard Dojo Newsletter Now we have 160 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

Lombiq .NET Analyzers, Shortcodes feature merged - This week in Orchard (04/09/2020)

We have mentioned the Shortcodes feature several times and now it's available in the preview packages of Orchard Core. We will also show a demo about how you can use our .NET Analyzers in your Orchard Core solution. Check out our post for more! Orchard Core updates Tabs syntax changed in the documentation Orchard Core documentation contains code samples both in Liquid and Razor languages. You can see the given code samples in tabs near each other. If you want to change between them you just need to click on the Razor or the Liquid tab to see the snippets. Now, if you would like to improve the documentation and put some snippet there too, you have to use a new syntax in Markdown. In the screen below you can see the old one in red, and the new one in green. Thank you for making the documentation better and better! Media root folder selected by default If you navigated to the dashboard of Orchard Core and opened the Media Library (Content -> Media Library) you may found that the images in the root folder were not available on the list on the right. The workaround was to create a new folder to see the files in the root. Now, this issue is fixed, the media root folder is selected by default and you are able to see the content in the media library without any workarounds. New icons for User Disabled and Enabled events A small UI change here. When you add a new User Disabled or User Enabled event to your workflow you will find new icons here. These icons are also used when you are working on your events on the kanban board of your workflows. Shortcodes feature merged Shortcodes are small pieces of code wrapped into [brackets] that can add some behavior to content editors, like embedding media files. The Image Shortcode can be used to display an image from the media library in your WYSIWYG editors. The simplest way to use that Shortcode is the following: . And the good news is that now you can find the Shortcodes and the Shortcode Template features in the preview packages of Orchard Core! In case if you missed you can find two videos on YouTube about Shortcodes: check out this one first, then watch this video for the second part of the demo! We also mentioned these features in This week in Orchard too several times. Check out this for an introduction, then this one for the first demo, finally don't forget to read this post to see the improvements of the Shortcodes! And the documentation is available in this URL! Update configuration documentation The documentation now contains more lines to explain how to read a configuration from an external config file, that you can use in your Startup class. Click here to see the updated page! New workflow task to validate user There is a new Validate User Task to check if the user exists for the current request and has the specified role(s). This task has three outcomes: InRole: if the user in the current request has at least one of the selected roles. Anonymous: if the user in the current request is anonymous. Authenticated: if the user in the current request is authenticated If you check the Set the 'UserName' workflow property if the user is authenticated checkbox, the username of the current user will be added to the Properties dictionary of the WorkflowExecutionContext that you can use in the upcoming tasks. Demos Lombiq .NET Analyzers Our Lombiq .NET Analyzers repository contains .NET code analyzers and code convention settings for Lombiq projects. We use these to enforce common standards across all our .NET projects, including e.g. in all of our open-source Orchard Core extensions. If you contribute to our open-source projects while using that solution you'll be guided by these rules too. There is a built-in code analyzer in Visual Studio, but there is a lot of other analyzer projects out there. These analyzers can find issues in your code, but this is about to extend that and try to find even more issues. The Readme.md file in the repository tells you how you can add these files to your solution in just two quick steps! Now let's see a simple example of this! Let's imagine that you have an interface with a method that represents an asynchronous operation. After we created our great interface with the method you will notice that the IDE complains about some stuff. First of all, we have an interface and a method in it with no documentation. The DoSomethingGreat method is an async method, so the correct name of the method would be DoSomethingGreatAsync. Pretty cool, right? But that's not all! Head to YouTube to see the full demo about Lombiq .NET Analyzers! News from the community Extending event handlers sample in the Lombiq Training Demo for Orchard Core 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 latest update of the module is about to show you how you can extend Orchard Core with event handlers. The LoginGreeting class is about to implement the ILoginFormEvent interface and shows a notification to the user after a successful login. Check out the code here! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 160 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!

Generic Site Settings Deployment Step, Extensible filters for contents admin list - This week in Orchard (17/07/2020)

The community has just released RC 2 a few weeks ago, but ever since Orchard Core has got several new features. This week among others we are going to see the extensible filters for contents admin list and the generic site settings deployment step. Orchard Core updates New column to the media library table view Enter the dashboard of your Orchard Core site and navigate to Content -> Media Library. Here you can view the uploaded files in a list view and in a grid view. You can switch between them using the little icons on the left side of the Filter textbox. If you view the files using the list view you will see a new column called LastModify. You can also sort the items by clicking on the header of the LastModify column. Extensible filters for contents admin list You can extend what filters are available in the contents admin list and each module can provide their own filters. Let's see this feature closely! First, install your site using the Blog recipe. Now, head to Configuration -> Features and enable the Taxonomies Contents List Filters and the Content Localization modules. The Content Localization is about to provide a part that allows localizing content items. The Taxonomies Contents List Filters feature is adding a new option under Configuration -> Settings -> Taxonomy Filters where you can select the taxonomies to filters in the contents list. As you can see, the Blog recipe comes with two predefined taxonomies: Tags and Categories. Let's select both ones. Now, head to Content -> Content Items, where you could see three new drop-downs. Categories and Tags can be used to filter by the values of the Category and the Tag Term content type. Just for the sake of demonstration make the Blog Post content type listable to see the Blog Post content items in the content items list. After if you select to filter for the content items that have the Earth tag, you will see the default one, because that post has each of these three existing posts. And you can easily add your own filters for the content items list! Without going into the details you have to add a new driver by implementing the DisplayDriver<ContentOptionsViewModel> abstract class and implement the IContentsAdminListFilter interface where you can provide the logic for filtering - modify the query (IQuery<ContentItem>) - content items. Check the TaxonomyContentsAdminListDisplayDriver.cs and the TaxonomyContentsAdminListFilter.cs files to see good examples about how to create your own filters. There was a demo about the new content filters and in the case, if you haven't seen it yet, you can watch the recording here. Demo videos in docs From time to time, the members of the community will do demos to show the latest features and improvements of the CMS. These videos are very helpful if you would like to learn a given topic (for example how to create Custom Settings using the admin UI) and you prefer videos. Now every topic in the documentation of Orchard Core containing the recording that is about showing you how to use the given feature. If we stay at the same example we will see the video at the bottom of the Custom Settings page. Add and implement IsJson() string extension method We are sure that you will meet some code in the future that is using JSON in their editor templates and you want to/need to validate that the text supplied in the editor is valid JSON. Now you can find a string extension method called IsJson() in the OrchardCore.Mvc.Utilities classes to do this. Demos Generic Site Settings Deployment Step When you navigate to the GitHub page of Orchard Core and list the open issues you will find one that is about listing the missing deployment steps, which means some settings do not have a deployment step to import and export them. The goal here is to be able to import/export every setting. For that, we have to get familiar with the notion of Generic Site Settings Deployment Step. You will find a new class library called OrchardCore.Settings.Core, where is a folder named Deployment that is containing logic to add site settings to a DeploymentPlanResult, a generic display driver that is responsible for the UI of the deployment plan and many more. Feel free to discover the content of this project! Now let's jump to the OrchardCore.Admin module. If you want to handle the custom settings via the OrchardCore.Settings.Core library, don't forget to reference it in your project. If you do that you can easily import/export the settings in your deployment plan. There is a class called AdminSettings in the OrchardCore.Admin module that contains one DisplayMenuFilter boolean property. Let's make it importable/exportable! Head to the Startup.cs file of the module and check out the DeploymentStartup class of it. Here you can see how you can use the provided generic business logic from the OrchardCore.Settings.Core project. You can see that we created a new deployment plan with the name: Admin settings and the description: Exports the admin settings by just passing these localized strings to the SiteSettingsPropertyDeploymentStepDriver. That's an easy and generic way to implement a deployment plan for your settings in your module! If you would like to know more about the generic site settings deployment step, head to YouTube! News from the community Intensive Orchard Core training for the In Motion team We had the opportunity to provide a five-day intensive Orchard Core training for the In Motion team! Read our post to know more details about the training! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 152 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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 - 11/22/2019

This week the community behind Orchard Core was soo productive again, that means we can ship you a lot of news around the CMS. You could read about the new UI for tenants, an updated Trumbowyg editor, updated script and style tag helpers and a nice demo about how to add tags using taxonomies! On Orchard Core Insert image in HTML instead of Liquid in the WYSIWYG editor In the past, when you insert an image using the HTML editor, it adds Liquid code. It can be a bit weird for some users that they would expect to be able to see the image in the WYSIWYG editor. The only advantage seems to be that it will resize the image to the expected size, but we are losing something important for "standard" users. A relatively low-risk option would be to render the media URL with the prefix only. The only case it would break the site is if the production instance uses a different prefix. The best solution would be to add a setting in the editor to either render media as img tags or Liquid tags. This way the end-user won't have to make the decision, and the admin knows how the site is published. To show you how this setting works, let's set up a site with the Blog recipe and edit the Blog Post content type. Add two new HTML Fields to it with the Trumbowyg editor type. For the second one, put a tick in the Insert Media with URL checkbox. Now upload an image to the Media Library then create a new Blog Post. Insert the same media item to both HTML fields and view the HTML of the fields. You could see that by default the Liquid tag is used to insert the image. In the case of the second HTML Field, you could see the img tag is used and when editing the content of the field, you could see the rendered image. Add view button to media app grid and field container The media app always appends ? to the query string, when building resized thumbnail URLs. With a custom secured blob media file store, in a project, this causes the query string to be built badly. This means the attached media field thinks the file doesn't exist, so tries to delete it every time. Dean Marcussen removed the cache busting support, but kept the check for an existing query string in the media app, this check fixes an issue using a custom secure Azure Blob implementation that appends a blob secure access key to the media URL. And there is a new View button to the media grid to each media library item in order to preview the file and easily copy the URL. Tenants new UI The Tenants page has a new UI based on the content items UI. You have quick filters to show only the running tenants, only the disabled tenants or only the uninitialized tenants. You can filter the tenants by the state or sort them by name or state. You can also disable or enable multiple tenants in a row. Prevent ConnectionResetException on SelectedContentType change Sometimes there was a ConnectionResetException when changing the content type selection under the content items index page. It doesn't stop the app but errors are logged. Microsoft.AspNetCore.Connections.ConnectionResetException: 'The client has disconnected'0x800704CD "An operation was attempted on a nonexistent network connection." It was first failing in FormValueRequiredMatcherPolicy and Jean-Thierry Kéchichian could fix it by checking httpContext.IsRequestAborted but then it was failing elsewhere in Asp.NET Core. We need to commit the following changes to fix the issue: Removed an event that seems to be never triggered. Then, when changing the content type selection, he kept the update of the action attribute but he removed the form submission that seems to be done in the following event. So he thinks the form was submitted twice and we were processing the second one while the page was refreshing on the client-side. Allow script/style tag helpers to add dependencies Now you have the ability for the script and style tag helpers to add to the dependencies defined on a ResourceManifest. A lot of the script tags uses depends-on="admin" for no good reason. However, that doesn't work when the resource is registered with a ResourceManifest. A ResourceManifest can set its own dependencies, but until now a script tag helper cannot add to them. It makes sense that a resource manifest entry should define its own dependencies, however not being able to add to them is confusing (and has led to some 30-40 entries using depends-on="admin" in the Orchard Core Razor code, that are useless currently). The best actual use case for wanting to add to dependencies on the fly is for the bootstrap-select. It's manifest depends on jQuery which is good, but it also needs Bootstrap. But Bootstrap is compiled into the admin.js. So the manifest can't refer to that, or it will fail when used elsewhere without the admin. So it makes sense to define the admin dependency on the fly. Noting that it currently works, in the correct order, because the jQuery dependency also exists in the admin, and it gets lucky. Demos Tags using taxonomies We don't have a tags module in Orchard Core that is using taxonomies. The decision has been made that the community wants to have a tags module that will use taxonomies. The idea is to use taxonomies in a way to create a custom editor for the taxonomy that would just reflect something like a tags editor and store the taxonomy terms as any other taxonomy fields. There are pros and cons for both solutions using taxonomies for tags and not using taxonomies for tags. Pro: Reusing what we already have. Con: Might be the performance, because we store term IDs, instead of storing the data, but there are ways to optimize that by also storing the data we want as a tag. Let's set up a site using the Blog recipe. Head to Configuration -> Features and enable the Taxonomies module. Then create a new content type and call it Site Tags. For now, only add the Title Part for this content type. Go ahead and create a new Taxonomy called Site tags and select the previously created content type as the term content type. Finally, add some sample term content types to this taxonomy. Now edit the definition of the Blog Post content type and add a Taxonomy Field to it. Edit that field and see that here you can select the Tags editor type to use. Now create a new blog post or edit an existing one. Here you can see that we added two taxonomy fields to the blog post, one with the standard editor (called Taxonomy) and one with the tags editor (called Tags). When adding tags, the green background shows that the selected tag hasn't been selected yet and the red background shows that the tag has been already added to the list. If you type something you can create a new tag that will be added to the list of tags (under development, but will be available soon). This feature is still under development, but you can check the progress in this branch. And if you checkout to the latest commit of this branch and set up your site using the Blog recipe you will find that the blog posts have a taxonomy field attached with the tags editor using some sample tags. Furthermore, the styling of the tags has been added too! It's a great sample for you to show how to add styling to your tags! If you want to see the full demo of using tags check out the video too! On Lombiq Poll to upload recordings of demos in separate videos as well Last week we created a poll on Twitter about uploading the recordings of demos from the weekly meeting in separate videos as well, so they can be found easier. We had 24 votes and everyone said that you want us to upload these demos separately. :) So from now, if you check the playlists of the YouTube channel of Lombiq you will find a new one, called Orchard Core Demos. Every new demo will be added to this playlist and the name of the video will be {name of the demo} - Orchard Core Demo. And (as you could see) from now we embed the recordings of the demos in our This week in Orchard posts too. Searching for performance-intensive codes Do you write a performance-intensive code? Then help us build the nerdiest .NET thing! Drop us a line to [email protected] and we'll ask a few questions about the challenges you encounter, and in exchange, we'll show you how to make a chip out of your programs! Orchard Dojo Newsletter Now we have 103 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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 - 10/04/2019

The first release of Orchard Core RC shipped last week, but the community has already added several new great features and improvements to the CMS! In our post, we show you two demos about the flow improvements and the new Sitemaps module! On Orchard Core Add helper and block Liquid tags to the Readme The documentation has been updated about how to use the helper and the block Liquid tags. Update asset cache to check Azure Media Storage is enabled Now you will get a warning message if you don't have the correct settings for the cache of Azure Media Storage. It means an updated media cache controller to check if the Azure Media Store is enabled or configured correctly, and shows an error, rather than an exception. Etch.OrchardCore.SEO module This is a module for Orchard Core that provides useful features for SEO. For example: Hostname redirects: define main hostname to redirect all domain variations and force SSL. Redirects: create redirect content items that'll redirect a relative URL to another URL. Robots.txt: manage contents of /robots.txt. If you are building a website and you would like to do the SEO to optimize your website for success, don't hesitate and get this module from NuGet! And if you are in GitHub, don't forget to check out the other modules from Etch, they created several features for Orchard Core. For instance the Etch.OrchardCore.Fields module with a collection of useful content fields and many more! Add WithPosition extension to set Field position There is a new WithPosition extension method on ContentPartFieldDefinitionBuilder, that you can now use instead of needing to use the MergeSettings. You can find this method in the ContentPartFieldSettingsExtensions static class. Document Azure Blob Storage We have updated the documentation about how to configure the Azure Media Storage feature and how to use the Media Cache feature. Demos Flow improvements Let's set up a new site using the Blog recipe. The Page content type here has the FlowPart attached, so let's create a new page. Let's add three new paragraphs to this page with some content. After that set the percentage of every widget to 33%. You can see a different UI at the bottom of every widget. Check out the dropdowns instead of radio buttons when setting the alignment or the percentage of the given widget. When setting the percentage, the editor is now updating with the new value, and in the case of 33%, you will see the three paragraphs next to each other in one row. You can also drag and drop the widgets to easily change the position of them! Now let's add a Container, that is just a container of other widgets. You can also define the width and the alignment of the container too. But here comes the trick! Before that, you cannot move elements outside or inside a container. If you would like to move a widget inside a container, you had to create that widget again in that container, which could be quite frustrating if you decide to move a dozen widgets to a container. Now with a simple drag and drop, you should able to take any widget and put it inside a container! Do you know editors from your company who'd love this feature? Show them these gifs! Sitemaps A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to more intelligently crawl your site. A sitemap tells the crawler which files you think are important in your site, and also provides valuable information about these files: for example, for pages, when the page was last updated, how often the page is changed, and any alternate language versions of a page. Let's see how it works in Orchard Core! Set up a new site using the Blog recipe. After go to the admin page and navigate to Configuration -> Features. Here search for the Sitemaps feature and enable it. This module will add a new option under Configuration, called Sitemaps. Here you can add a new Sitemap set by clicking on the Add Sitemap Set button. Give it a likable name and then hit the Edit Nodes button. Here you can choose between two different types of sitemap nodes: Sitemap Content Types: adds a sitemap entry for each one of the selected content types. Sitemap Index Node: adds a sitemap index that acts as a container for other sitemaps. Let's create a Sitemap Content Types node to have a sitemap that contains the Article Content Types of our site! As you can see on the screen we should add a description for the sitemap node first, then the path of our sitemap. And here comes a huge table that contains every available content types of your site. Put a tick near the Article and leave the other settings as-is. Note that when you uncheck the Include all checkbox, you can adjust the number of content items in the sitemap by setting the skip and take values. For now, just put a tick here. Now if you create this node, you will have a green View button next to it. This will show the content of your sitemap. In the URL you can see that path we have set up earlier and the relevant fields of the Article content types. As you can see we previously created one additional article with the my-second-article alias. The module has a great Readme.md file where you can read a lot more about the feature and the different node types. This feature is still under development and can be found in this branch. Big thanks to Dean Marcussen for this great contribution! On Lombiq Orchard Dojo Newsletter Now we have 96 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 whenever a new post published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here! 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!