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

Show a badge if a user is locked out, Lombiq Orchard Visual Studio Extension v.1.8.1 - This week in Orchard (27/06/2025)

This week's topics include displaying a badge when a user is locked out, renaming the ResetIndexProfile and RebuildIndexProfile recipe steps, and enhancing documentation for the indexing module. And have we mentioned that we've released a new version of our Orchard Visual Studio Extension, which now includes support for Razor Pages to the Dependency Injector?

Latest tutorials

Featured tags

IIS
API
SMS
SEO
MCP
All tags >

ContentElement.OfType extension method, using Pulumi with Orchard Core - This week in Orchard (06/03/2020)

Proposal for new extension method ContentElement.OfType, improved documentation of Orchard Core, UI changes and a demo about how to use Pulumi to programmatically create cloud resources and deploy your Orchard Core application! And finally, let's see the breaking news about the next Harvest! Orchard Core updates Make alerts dismissable in TheAdmin theme Now you can click on a little x at the right-top corner of the alert to close it. Note that this improvement is for the TheAdmin theme. Proposal for new extension method ContentElement.OfType You can iterate over all the properties (let's say parts) of a content item and if this part matches the type you want, then it will let you know. This is a little helper to find the part in the content item or a field in a content part if you know the type that you want. And if there are many of them you will get all of them. For this, you can use the OfType extension method in the ContentExtensions.cs file of the OrchardCore.ContentManagement.Abstractions library. Let's say you would like to get all of the attached PricePart of a content item. In this case, you could do something like this: foreach (var pricePart in contentItem.OfType<PricePart>()){ // } Upgrade blob storage library Upgrading blob storage to use the Azure.Storage.Blobs REST API Client v12 because the v11 client has been identified as not thread-safe, and advice from the Azure team is to upgrade to the v12 library. DataProtection continues to use the old library as it has not been upgraded yet but references it transitively, so we don't need to keep a reference to it. Behavior with regard to directories changes with the REST API Client, so to find directories we now need to enumerate the IAsyncEnumerable with a prefix to see if files exist in the hierarchy. Add create a custom admin theme guide Orchard Core documentation has a new guide explaining how you can add and enable a custom admin theme that uses the TheAdmin as a base theme. Rename ContentField display driver files to resemble class names and conform to conventions Notice that the naming of the DisplayDriver files in OrchardCore.ContentFields was inconsistent and in most cases did not reflect the name of the class within. For example, the HtmlFieldDriver is renamed to HtmlFieldDisplayDriver and the TextFieldDriver is renamed to TextFieldDisplayDriver. Rename GetContentItemIdByAliasAsync into GetContentItemIdByHandleAsync There are methods called GetContentItemByAliasAsync and GetContentItemIdByAliasAsync and these expect a string that is an alias. It can be an alias, but it can also be a slug, an ID or whatever you want. It's like get something by a little name. Based on the prefix of the little name we can find the item. Now these methods have a new name called GetContentItemByHandleAsync and GetContentItemIdByHandleAsync. And the previous methods are now marked as obsolete, so, if you are using these methods, next time you will get a warning message when you build the source code. Validate LinkField URL The validator in the LinkField didn't allow you to use anchor links within the URL input. Now it has been fixed and it's accepting a URL with an anchor. Head to the LinkFieldDisplayDriver.cs and check the code of the UpdateAsync method! Add missing Sender SMTP field and add Author expression editor for the EmailTask Based on the specs, we should be able to set the From and the Sender fields. Today we only ask for From and actually copy it to the Sender. We were missing the Sender field for the SMTP message that we want to send. The sender is optional, it is useful when the email author is different than the email submitter. From now you can use this field when sending an email. And if you are using the Email Task when building your workflow, now there is the expression editor for the From and Sender properties on the task. If you haven't provided the value of the author (in the From field), the value of the Sender field will be used. Sort dropdown widgets alphabetically When having to insert widgets in the FlowPart content editor, the list of all widgets is displayed according to creation date which gets quite messy with a lot of widgets. An easy solution, for now, would be to simply sort the name of the widgets alphabetically to give it some easy structure. So, from now when we list the widgets in the Forms and the Widgets List UI, it's alphabetically ordered. BagPart documentation There is new documentation explaining how to use BagPart in Orchard Core. Here you can also find samples about how to do templating both with Razor and Liquid and what are the available alternates that you can use when working with BagPart. Demos Using Pulumi with Orchard Core By using Pulumi you can programmatically create cloud resources in Azure, AWS, Google Cloud or Kubernetes. In this video, you could see that how does it work in the context of an Orchard Core application, but of course, it works for any website that you want to deploy. It supports the notion of infrastructure as code, that allows you to define your infrastructure literally as code. This is very powerful, because that allows you to create for example your Azure App Service or even a Kubernetes cluster programmatically, so you don't have to do it manually. If you are interested in this demo, don't forget to watch the YouTube video about it! News from the community Breaking news about the next Harvest Based on the ongoing events the best would be to cancel Harvest. Right now there are so many unknowns about the evolution and the spread of the virus. Maybe London will be blocked, maybe Washington will be blocked, we don't know. And by asking about 50 people from everywhere around the world to meet in a closed basement for three days could not be the best idea for know in terms of health. So, Harvest will be postponed until things are settling down. This is the safest choice right now and also the most secure in terms of organization. Orchard Dojo Newsletter Now we have 121 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!

Taxonomy and contained content items routing, new options for TitlePart and AliasPart - This week in Orchard (28/02/2020)

New options for TitlePart and AliasPart, adding CodeMirror support for HtmlBodyPart and HtmlField, the Pager shape and demo about the taxonomy and contained content items routing are waiting for you in our upcoming post with many other cool features! And about the news from the community: there is a new Orchard Core website, news about the upcoming Harvest and welcome a new team member in Lombiq Technologies! Orchard Core updates Disable feature confirmation messages When we disable a feature we will get a warning that says that the feature that you would like to disable has dependent features that are enabled. Let's disable the Widgets feature. In this case, we will get the following warning message, because Flows and Layers are built on the Widgets module. New options for TitlePart and AliasPart There is a new setting, called AliasPartOptions. Using this new option you can define that the alias can be editable when editing a content item from the admin UI or make it disabled, which means it will be generated automatically using the defined pattern. And when using the TitlePart, you will also find a new option there, called EditableRequired. This means admins can edit the title of the content item and it needs to have a value because it's required. Html mode for CodeMirror on HtmlField and HtmlBodyPart standard editors CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code and comes with a number of language modes and addons that implement more advanced editing functionality. And now if you set up your site using the Blog recipe and create a new article, the editor of the HtmlBodyPart will come with the CodeMirror support! Furthermore, the Standard editor mode of the HtmlField is also got the CodeMirror support. Moreover, Orchard Core using the latest version of CodeMirror, which is 5.52.0. Pager shape At the bottom of the documentation of OrchardCore.Navigation you will find code examples both for C# and Liquid about how to use the Pager shape in Orchard Core. Add a recipe step to create scope for OpenID Now you can set the connect scope of the OpenID using recipe steps, that you can do in the following way, that could be found in the documentation of OrchardCore.OpenId. There is also a possibility to set the Token Validation Settings with recipe steps. Here you have to provide: Name: unique name of the validation settings. Audience: defines the intended recipient of the token that must be checked. Authority: the address of the remote OpenID Connect server that issued the token. Filter deployment steps There is a new search box on the UI for the deployment steps to filter the list of the available steps. To check out this feature create a new deployment plan under Configuration -> Import/Export -> Deployment Plans then add a new step to it. In this modal window, you will find the textbox with the Filter placeholder text in it. In our case, we typed settings, which means these three steps will be the results of our search. Sitemaps module We wrote about a very cool feature for Orchard Core, which is the Sitemaps support three times now: here, here and here. In every post, we described the features of this module and showed the way how you can use them. And you can also find a recording of this feature on YouTube. The reason why we mentioned that is because this feature is now merged in the dev branch of Orchard Core, thanks to Dean Marcussen! He also added nice documentation about how to create sitemaps, localize sitemaps, cache sitemaps and so on. Setting and Removing HttpContext.Items from Liquid template Now there is a new Liquid filter called httpcontext_add_items, that adds key/value to the HttpContext.Items collection. And you can also remove items from the HttpContext by using the httpcontext_remove_items Liquid filter. You can read more about these two new Liquid filters in the documentation. Do note though that there are possible security implications to this, see the discussion under the pull request. Support most commonly used error pages According to Pingdom research, the top 5 most common errors are 401, 400, 404, 403, 500. So, this is about adding more custom views for error codes that you can change in your themes. Check the content of the DiagnosticsController.cs in the OrchardCore.Diagnostics module. Demos Taxonomy and contained content items routing The main issue is that currently we don't have routing for taxonomies or contained content items. The taxonomy routing is about we would able to route an item inside a taxonomy for a term. The goal is to be able to list all the things that are associated with this term. The issue is that in the case of BagParts or anything that is contained in a content item can't be routed right now, because Autoroute doesn't work on sub-content items. The second thing we looked at was the dynamic routing to be able to define a patterned route in a content item. In this case, multiple URLs would match the same content item and the content item could use these route values to render something differently or do queries. These are two different things, but we are talking about them at the same time. If you are interested in how to do that in Orchard Core check out the following demo on YouTube about this upcoming feature! News from the community A new website using Orchard Core Luxury Card is a global leader in the premium credit card market. From patented metal cards to a 24/7 Concierge service and app, their mission is to shape the industry with innovation, value, and service. With leading airfare and cashback redemption rates along with first-class benefits, they believe your credit card can pay for itself. 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. Freshest news about the next Harvest We have a room booked for the dates June 22-24. This is the reserved interval that we will have for sure now. The maximum people can fit in the room is 50 people. The only concern is that it could be not enough, it would be nice to know how many people are interested in coming to the next Harvest. There will be a questionnaire or something to be able to measure somehow the number of people who could be the possible attendees at the next conference. New team member in Lombiq We have a new team member, Gábor! Turned from English studies to competitive gaming to software development and Orchard Core. Check out his bio on our About us page! Orchard Dojo Newsletter Now we have 119 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!

Users change email feature, register DisplayDrivers with ContentOptions - This week in Orchard (22/02/2020)

Orchard Core has got very useful and great features again! The blog recipe is extended with predefined search settings and permission with banner images. Now users can change their email address and the documentation of Orchard Core is getting better and better! Then we will see a demo about how to use Orchard Core as a Headless CMS with an Angular 9 client app using GraphQL! Orchard Core updates Add search settings and permissions for the blog recipe Now when creating a new tenant with the Blog recipe it will automatically create all the required assets to make the search page work. This means that you will find a SearchIndex called Search in the recipe and the users in the anonymous role have the permission to query this Lucene search index. Add Media to Blog and Blog post When you install your site using the Blog recipe you will get a sample blog theme with some predefined content that could be very helpful to you if you would like to create a blog using Orchard Core. Now the Blog and the Blog Post content types have a new Media field, called Banner Image. With this new field, you can edit the banner image of the blog and of the blog post. The Blog theme and the recipe is also modified to have a default banner image for both content types. Users Change email feature Head to Configuration -> Features where you will find a new feature called Users Change Email. When you enable this feature (and the Email feature too), this allows users to change their email address. After enabling this feature you will find a new menu under Security -> Settings, called Email. On this page you will find a new checkbox: Allow the users to change their email. If you put a tick here you will get a new endpoint that you can provide for your users. If you navigate to ~/ChangeEmail URL, you will see a screen, where the user can provide the value of the new email address. Document missing global methods If you open the documentation of Orchard Core and head to the Scripting page you will find the list of the global methods that you can use to evaluate scripts. The variables(), parameters() and configurations() methods were missing from this table, now the documentation contains these ones as well. Rendering zones before rendering layout When we used to inject the body in the dynamic layout shape template, it would go over every zone in the layout and render them in memory and only after that called the actual shape layout to be rendered. This way all the zones from footer and header will be invoked after every inner zone. If the inner zone is defining some resources, then they would be taken into account once they are injected in the footer and header. There could be some widgets for instance that would try to define some resources, but they would not be taken into account because the header is already rendered. Check the ExecuteAsync method of the ThemeLayout class in the OrchardCore.DisplayManagement module. Layers documentation Orchard Core documentation has got a new page again! When you navigate to the page of the OrchardCore.Layers module you will find the description of the layers, the list of the predefined layer rules and about how to use zones. Register DisplayDrivers with ContentOptions This change allows you to register custom drivers, but instead in the DI, in a custom data structure. If you crate drivers you have to follow the new way to do that. So, for both Display Modes and Editors, you can customize the Display Driver that will be resolved for the particular mode. This allows you to create custom display drivers that might return a different ViewModel to the standard Display Driver. services.AddContentField<TextField>() .ForDisplayMode<TextFieldDisplayDriver>(d => String.IsNullOrEmpty(d)) .ForDisplayMode<MyCustomTextFieldDisplayDriver>(d => d == "MyCustomDisplayMode"); This example will alter the registration for the TextFieldDisplayDriver to resolve for only the Standard (null) display mode, and register MyCustomTextFieldDisplayDriver to resolve for only the custom display mode. You can find more information about how to register drivers with ContentOptions in the updated documentation of the Content Fields module. Menu: Hide Preview button in admin If you go to edit a menu you saw the Preview button. But you can't preview a menu because a menu is injected in a page like a layout, so there is no specific way to view a menu. If you call Preview on the menu it will try to render the menu without any context and that will not work. Either we add a PreviewPart on the menu and then we can say what page we want to see when we preview the menu that could have been a way to do that. Or the easier solution is to define a placement file where you say that the content preview button shape is hidden when the content type is a menu. This placement file is in the OrchardCore.Menu module. Demos Orchard Core Headless CMS with an Angular 9 client app using GraphQL Watch a great video about how to set up a Headless CMS using Orchard Core then make API calls from an Angular 9 client app using GraphQL! You can find the source code of the demo project in this GitHub repository News from the community New websites using Orchard Core RaiseTheGame is designed to inspire meaningful cultural and behavioral change in all game companies, whatever your size and wherever you are in your diversity and inclusion journey. The guys behind Modern Wolf believes the true test of a publishers value is the decision of those it supports, to work with them again. This mantra is the benchmark against which they base all of their operations and decisions. 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 Now we have 118 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!

Display mode options to Parts, Search views for themes - This week in Orchard (14/02/2020)

Display mode options to Content Parts, adding search views for themes, import recipe from a JSON file and many other changes and new features come in our current post. After we will see a real-world example about how to use Orchard Core in production. Then check a new website built with Orchard Core and finally let's talk about the latest news about the Harvest! Orchard Core updates Add revision date in the documentation Now each page of the documentation will display the revision date of the current page. Open any page of the documentation and scroll down to the bottom of it. There you will see the date of the last update. Use ControllerModelUpdater on controller instead of implementing IUpdateModel When you want to Build, Update or Validate your model from controllers, you don't have to implement IUpdateModel, because each of them can be resolved by injecting the IUpdateModelAccessor. Here you can see the NodeController, where we need to build the display for the AdminNode using the TreeThumbnail display type (line 74). Instead of passing this, we can pass the _updateModelAccessor.ModelUpdater. Only show fields in Summary and Detail display types In the past, if you added a field (or a few fields) to a blog it's SummaryAdmin view shows in the list of blog posts. That's because the fields are automatically displayed in SummaryAdmin. Now, this feature prevents to display all the fields automatically in the SummaryAdmin. If you check out a driver of a field, you will see that the values of the Location now changed everywhere in the case of the Initialize method. Add display mode option to parts Now we can have custom display modes for Content Parts too! For example, now you could define which tag would you like for the title and the name of the tag could be the display mode of the TitlePart. Fix themes search views fix Changing all the themes to provide a nice view for the search feature. There was a default version of it, but now each theme has it's own and now it looks great in every built-in theme. If you want to change the look of the search form, you would override the SearchForm template, if you would like to override the search results page, the SearchResults template will be the one you are looking for. But of course, you can override the whole look and feel of the search template just by overriding the Search template. Here you could see the Agency theme with the search form and search results. And you could find really great and detailed documentation about how to implement a website full-text search and everything about the new templates. YesSQL: when to call Session.Save? You can call _session.Save(contentItem) as many times as you want, it's free. It's just marking a content item to be saved once the session will be disposed. There will nothing happen when you call _session.Save(contentItem). If you call it multiple times, the first time it will mark it, the second time it will say: It's already in the dictionary of things to be saved. It will be just a dictionary lookup. Call _session.Save(contentItem) when you think the thing should be saved once the session or the request is done. And if multiple things update a content item and you need to tell the session to save it, they can all call _session.Save(contentItem). Import recipe from a JSON file When you are importing a recipe, you have to upload a ZIP file. The logic then extracted that file and found the JSON file in it. From now you can pass a JSON file when importing a deployment package, not just a ZIP. Recipes documentation And if we are talking about that you can import a recipe from a JSON file, we also need to mention that the documentation of Orchard Core has got a great detailed page about the recipes. Here you could see the format of the recipe, the possible steps of the recipe and see samples about each of the steps (Roles Step, Queries Step, Media Step, Layers Step, etc.). RequireUniqueEmail message Now when you would like to register a new user with an email address, that already exists in the system, you will get an error message says that the email is already used. Demos SaaS and OpenID: a real-world example There is a solution called Trivest Connect (an Enterprise Resource Planning application) that currently includes five different companies. One problem that Trivest solves that everybody sends messages to each other and there is no standardization, that is not so optimal. In the use of Trives Connect with many other features there is a standard document format and with that, it is easier to exchange orders, invoices, VIA, etc. Trivest Connect is based on Orchard Core installed with the Software as a Service recipe that is using the built-in Open ID Server. Here you could see that there are really just a few modules enabled in the admin UI. What customers can do is they can send messages to other customers. This is just an administrator portal because, in reality, this is all done behind the scenes in the ERPs. If you would like to see the whole demo of this real-world example just head to YouTube and watch the recording! News from the community A new website using Orchard Core RA Capital Management is a multi-stage investment manager dedicated to evidence-based investing in public and private healthcare and life science companies developing drugs, medical devices, and diagnostics. And they decided to use Orchard Core to implement their website! 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. Latest news about the Harvest There is a new offer from someone from the UK to host Harvest in their offices. They mention 50 people fit in the office. This office is located in London. The possible date for hold the Harvest is the last full week of June. We have to decide the length of the conference and talk about holding a workshop during Harvest. By the past, we have usually done it at the beginning of the week, because this way you can arrive at the weekend, take your time or get back from jetlag or do some tourism. And then if you want you can extend your stay to the week. So 22-23-24 might be the tentative dates. Usually, 2 days are too short and 3 days are too long, but we will see. What do you think about June 22-23? Feel free to comment on that on Gitter too! Orchard Dojo Newsletter Now we have 116 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!

User disabled/enabled events, filter admin menu - This week in Orchard (07/02/2020)

Orchard Core has got several new features and fixes this week! With many others, we will see the new user disabled/enabled events, the new IAreaControllerRouteMapper implementation, the way how you can filter the admin menu then show you a demo about how to integrate stripe.js in your Orchard Core application with workflows. And finally, say some words about a new tentative date and location for the upcoming Harvest! Orchard Core updates Reduce the length of indexes for Content Fields Indexing Let's focus on the LinkFieldIndex and check these two columns: the Url and the BigUrl. The Url is the one that is trimmed and indexed, and the BigUrl is the original data that is not indexed. If you are using MySQL, the maximum length that this provider can support in an index under UTF8 collection is 768. Now we set the maximum length of the indexed columns is to not be longer than the supported length. Do not check "Include all content types" in deployment step by default When you create a content type deployment step, the default is to export all types. Now, this is unchecked by default. Adding User Disabled/Enabled Events The IUserCreatedEventHandler is changed to IUserEventHandler and there are two new events: DisabledAsync and EnabledAsync events. These two new events now triggered in the UserDisplayDriver that will trigger the two newly created workflow events to make it work in your workflows. Adding IAreaControllerRouteMapper Now there is an updated way how the admin prefix is applied by using custom convention and constraint that will ensure that the admin URLs start with the admin prefix. And also ensure that it is done correctly for the controllers that are named AdminController, not the ones that start with admin. Before every controller that starts with admin could be an admin controller, but now with this new convention, it has been decided that only controllers named AdminController can be an admin controller. For example, a controller named AdminItemController doesn't fall into this category, so it can't be an admin controller. A concrete implementation being AdminAreaControllerRouteMapper that uses AdminOptions to provide a default route pattern that is used in the OrchardCore.MVC startup. Just as a reminder, if you have admin controllers you have to name them AdminController or have the Admin attribute on that. This will ensure that the URL is strictly using the admin prefix (or whatever you set it), and the user has the admin permission and this will also apply the admin theme to the views from this controller. Filter admin menu Head to Configuration -> Settings -> Admin and put a tick near the Enable Admin Menu filter checkbox. Now you will have a new textbox at the top of the admin menu with a Filter placeholder text inside it. If you type something here you can filter the menu items and could find easier the option you want. And if you hit CTRL+SHIFT+F, this textbox will get the focus and you can type the menu option that you are looking for without needing to click into this textbox. Add menus content listing and create option If you navigate to the Content option of the admin menu you will find a new one, called Menus. This feature is listing all the menus of the system, and if you can see, there is a new button, called New Menu. By clicking on this button you can create a new Menu without needed the Menu content type to be creatable. Make lists sortable with ordering setting A few weeks ago we write about a way how you can make sortable lists using the Enable Ordering setting of the ListPart and you can also find a demo on YouTube about this feature. The good news is this feature is now merged to the dev branch of Orchard Core! Checkout to the latest changeset of the dev branch and try this feature now. Then don't forget to tell your opinion about it in the comments section! Razor Helpers documentation Now there is a new page in the Orchard Core documentation that contains the extension methods that are available in Razor using @Orchard. This documentation also contains the way how to use an extension method in a view and in a controller too. Demos Stripe.js and Workflows You can use Stripe.js’ APIs to tokenize customer information, collect sensitive card data using customizable Stripe Elements, and accept payments with browser payment APIs like Apple Pay and the Payment Request API. And of course, you can add Stripe.js to your Orchard Core site too! Let's create a registration form where users can register and after successful registration, they can pay the fee for a ticket. After the user submits the form, here comes a huge workflow, that will validate all the fields of the form. Here you can see the several validations, and when there is no error, the workflow will send an email, create an Enrollment in Orchard Core and redirect the user to stripe using a Fork. And there will be another workflow that will validate the payment using the response that Orchard Core will get from stripe.js. Now let's take a closer look at the Create Content Task that creates a new Enrollment content type. When you are creating a new content type using this task, you have to write the properties of the content. This is the JSON that is used to construct the given content item. As you can see, here you can use different Liquid expressions as well, for example, we could use the data coming from the form. You can see the website using this registration form under this URL. Here just click on the Register at the top right and select from the listed options. If you would like to see the whole demo just head to YouTube and watch the recording! News from the community A new tentative date and location for the next Harvest We have another tentative date for the next Harvest: the last week of June. In this date, we could do it in Europe and in a location that is easier to go from the USA too. London and Amsterdam have airports that can be reached easily from several other countries as well. What do you think about the new date and locations? Orchard Dojo Newsletter Now we have 114 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!

Cors, user account activation - This week in Orchard (31/01/2020)

This week we would like to show you two new Orchard Core demos: the user account activation and the new CORS module. But before that let's take a quick look at the newest features and improvements of Orchard Core! Finally, let's see what about the next Harvest? Orchard Core updates Add more Resources documentation The Resources page of the Orchard Core documentation has been improved a lot. Now on this page, you can find examples about how to register a named resource by implementing the IResourceManifestProvider interface, how to render your registered resources in the different sections of the page using Liquid or Razor and many more! Update the OpenID YesSql stores to execute a concurrency check on updates We have a new feature in YesSql when saving a session. Check out the following line: _session.Save(application, checkConcurrency: true); In the code snippet above, we would like to save the Open ID application and check that nothing has changed the application between it was loaded in this process and saved with the current changes. And if there is an issue, it will throw an exception when we call await _session.CommitAsync(). Then it will catch the ConcurrencyException saying something else changed the application while you were saving it so, please try it again. Fix issue with layers that can be drag and dropped to zones The targets for the zone dragging were too loose and then you could drag a widget to a layer or a layer to a widget. Now it's fixed. Fix regression for Tag Helpers not working There was an issue that some things were working in development mode and not in release mode. In development, Orchard Core finds the Tag Helpers because views are compiled at run time in the context of the application, while published .Views.dll files have been precompiled in the context of their related module or theme. In production, it will not work, because for example if you would like to use the ContentItemTagHelper, the reference was missing from one module to the OrchardCore.Contents module. Dean Marcussen created a new OrchardCore.Contents.TagHelpers project, that contains the Tag Helpers of the OrchardCore.Contents module. And now whenever we have Tag Helpers, we put them in their *.TagHelpers library. So, when our themes and other modules will need those Tag Helper, we can just reference this library and not the full module. In the _ViewImports.cshtml files where we are using the OrchardCore.Contents assembly to find Tag Helpers we need to look for the assembly named OrchardCore.Contents.TagHelpers. It should not break any websites if you are using Liquid, but if you are not using Liquid, it's possible that the site will be broke after this change, meaning the Tag Helpers won't be found and as we said, you need to change your _ViewImports.cshtml. In the future, we have to do the same for all of the Tag Helpers. Standard display option for each field If you want to add a Display option for a field that does not have a standard one, when you re-edit the settings and save, the new one will be selected as the default even if you don't want it. To solve this issue we added a Standard option for all the fields. Let's see the HtmlField.DisplayOption.cshtml file as an example. Sort Workflow instances Your Workflow could have several Workflow instances and if you have many of them, it could be hard to find the one you want. In the past, you had the option to filter the instances by their status (all, faulted, finished), and now there is a new option to sort these instances. You can sort them by the recently created or the least recently created. Simplify part settings retrieval for ContentPartDisplayDrivers In the ContentPartDisplayDrivers, we need to resolve the ContentDefinitionManager, query the type definition and then find the part that is named the same that we are using, take the first one and get the settings. But in the BuildPartEditorContext and UpdatePartEditorContext we already have the TypePartDefinition of the part that we are currently editing, so we can just get the settings from there. This change made the code simpler and technically faster. Just take a look at the changes in the AutoroutePartDisplay! Demos User Account Activation Currently, Orchard Core supports registration and approval or manual entry. What about having a way to have the option to invite users onto the platform and let them choose their password and then activate their account? Let's see a possible future release for this feature! Install your site and then enable the Users Registration feature. Now head to Security -> Settings -> Registration, where you will find a new option: Administrators can send an activation email to a user. Put a tick in this box and select the AllowRegistration from the select list. Now go to Security -> Users and hit the Add User button. Here you could see a new switch called Send Activation Email?. If you create this user with this switch enabled and hit Save, this user will get an email that email will contain an activation link. If the user clicks on this link, they can choose a password for the account. After they set the password their account is activated and they can log in to the site using the newly created password. To do that, you should disable the account of the user when creating it. But what's behind this feature? Create two new Workflows to send emails. Let's call the first one to UserAccountActivation and add the Account Activation event as the startup event for this Workflow. Then add a Send Email task that will send the email to the user. This email will contain the activation URL of the user. Create another Workflow that will send another email that tells the user that their account is activated. Let's call this Workflow UserAccountActivated. Here you could use the Account Activated event as the startup event and again, add a Send Email task. The feature will be improved in the future because as you can see, the Send Activation Email switch is not really about sending an email, it's just about rising an event, that you can use in your Workflows. Instead of this, we could have for example a user state (Needs Activation) similar to the IsDisabled switch. And that's not all! If you would like to know more about this feature, head to YouTube, where you can find the full demo about the user account activation! Cross-Origin Resource Sharing (CORS) module If you head to Configuration -> Features and enable the Cors Configuration module, you will find a new option under Configuration -> Settings, called Cors. If you navigate here you can add as many policies as you want using the Add a policy button. On this page, you can add the name of the policy, set that as the default policy and configure everything that you will need to enable CORS. If you are interested in the full demo, don't forget to check out the recording on YouTube! News from the community The possible date of the next Harvest We had two possible dates for the next Harvest: one in February and one in April. Now it looks like it won't happen in February, so the only option left is to do a Harvest in April. The possible days could be between 13 and 17 in April. We also have two possible locations, which are Nice and Miami. Stay tuned for more information about the next Harvest! Tell us about your .NET performance challenges! - Hastlayer developer survey Help us build the nerdiest .NET thing, Hastlayer: It turns performance-critical sections of .NET programs into computer chips! If you fill out our short questionnaire you can win a cool compute accelerator board worth $265! Check it out here: https://forms.office.com/Pages/ResponsePage.aspx?id=Wt6elek45kStyIVVO-uCIMkFNjqW2E1Pm4v3YMcflMNUOVlDNUE3MlpDS044VDI1OEFSMUgxUkxSTC4u The reason we're asking this is that we're building a .NET hardware accelerator, Hastlayer (https://github.com/Lombiq/Hastlayer-SDK it turns your program into a chip!) and want to better understand what other developers do. Thank you in advance! Orchard Dojo Newsletter Now we have 114 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!

Sitemaps, headless recipe, jsonparse Liquid filter - This week in Orchard (24/01/2020)

With many more features and updates, this week we check out the new headless recipe, the new jsonparse Liquid filter and the updates of the Orchard Core documentation. We show you a demo about the Sitemaps feature and write about when to ship version 1.0 of Orchard Core! Orchard Core updates Add Headless recipe Now you can find a new recipe called Headless. This is a new setup recipe that sets up a headless site that consists of CMS modules with GraphQL and OpenID. If you want to build a headless site, you will need to set up your site using this recipe. By the past, we were suggesting users do an empty site using the Blank recipe (empty.recipe.json) and then to enable OpenID and the needed modules. By using this recipe these modules are enabled by default. If you haven't seen it yet: there is a great detailed demo on YouTube about what will you get if you install your site using the Headless recipe. Documentation for recipes and starter themes included with Orchard Core Orchard Core is available for use via two different NuGet meta-packages: OrchardCore.Application.Cms.Core.Targets OrchardCore.Application.Cms.Targets You can also use several built-in themes: The Blog theme The Admin theme The Agency theme The Coming Soon theme The Theme And choose from different kind of recipes: Empty recipe Blog recipe Headless recipe Agency recipe Coming Soon recipe Saas recipe These themes and recipes include different configurations, different range of Content Types, Widgets and so on. There is a new getting started guide that lists what will you get if you install your site with one of the built-in recipes. If you are new to Orchard Core this guide will help you a lot to choose the recipe that fits the best for you. Fix previewing When you preview a content item we create a transient content item in the server-side memory and then we asked it to be rendered. Then we send the rendering to the client. That's how the preview feature works. Every time when you do a keystroke, we fake like it's a real content item, ask the server to create it in memory and to render it in HTML and send us back by the HTML. The issue was when we create it on the server-side it's like a real creation including indexing. Lucene will be like: there is a new content item to index, so let's index it! And then it will appear in the index, but it's just a preview. The idea is to find a way to mark it. A possible solution is to check the ID of the content item and if it's -1 (it's a logical value that we set for the content item to say it's transient), it's not a real content item, so just ignore it. Update "Creating a modular ASP.NET Core application" guide The section called Registering a custom route in the Creating a modular ASP.NET Core application is out of date with code generation templates and implementation since the upgrade to .Net Core 3.0. Generation templates create a Configure() method which accepts an IEndpointRouteBuilder (formerly IRouteBuilder), which does not have a MapAreaRoute() method. MapAreaControllerRoute() is the method to use here. Get draft content item by the alias Before we just indexed the published version of the aliases. If you are following the Creating a new decoupled CMS Website guide it tells you how to get a preview of a content item using an alias in a custom Razor Page. The issue is that it would not work if you were creating a new item and then previewing it, because there would be no published version of the content item, so it would not be able to find the content item by its alias. Now we are indexing the alias for both for the latest and published versions of a content item. The latest version can be the published one if there is no draft. Add jsonparse Liquid filter Let's say you would like to be able to pass a custom JSON using Liquid. Before that, we have to create a string separated by commas and then split it and then you will have an array. And then do it for each property you want, because you wanted to generate tables based on existing values you had. In the documentation, you can see an array of objects captured to a variable named someCollection. Using that, someCollection becomes a string variable that contains that JSON document. By calling the jsonparse using the someCollection you will get a JObject and then it can be iterated on and accessed by the key and value properties. This filter is enabled by default when you do Liquid. When to ship Orchard Core 1.0? We have issues labeled with P0 and P1. These issues should be fixed to ship version 1.0. We can't ship the new version without fixing these issues. The more the community works on these ones, the quicker we can release 1.0. Feel free to grab from these to be able to release sooner! Demos Sitemaps module revisited Let's set up a site using the Blog recipe. Then head to Configuration - > Features and enable the Sitemaps module. To use this module you need to set up the Base URL of your site under Configuration -> Settings -> General. After you have typed a fully qualified base URL of the web site, head to Configuration again, where you will see a new submenu called Sitemaps with two options: Sitemaps and Sitemap Index. Choose the Sitemaps one and click on the Add Sitemap button. Here you can see an Enabled checkbox, that gives you the ability to enable or disable your sitemap. If you uncheck this, you can disable the routing to the sitemap. If you are in the middle of constructing your sitemap or you don't want to publish it for some reason, you can uncheck this box. Give your sitemap a likable name and hit Create. Now you can add sources to your sitemap using the Add Source button. Here you can add Sitemap content types, that are entries for each one of the selected content types. Here you have the possibility to index all content types or just the selected ones. You can also limit the number of content items to provide from this source. Let's say we want to include the first 50000 blog posts to this sitemap source. After you hit Save, you can view your sitemap. To create a sitemap index, select the Sitemap Index option. Here you can set the URL of the sitemap index and the sitemaps this index contains. We have only one sitemap, so, select that one. When you enabled the Sitemaps feature, you could see another related one in the Features list, called Localized Content Items Sitemaps. If you enable this module and have localized content items, you can build localized content items sitemaps. Let's see how a sitemap like this looks like! Here you can see the language of the given content item inside the hreflang elements of the XHTML tags. The content with the primary culture of your site goes first, which is en-US in this case. In the screen below you can see a sitemap that contains one blog post, that has a Hungarian localization too. And that's not all! If you would like to know more about sitemaps, head to YouTube, where you can find the full demo about sitemaps! This feature is still under development, but you can check the PR here. News from the community Tell us about your .NET performance challenges! - Hastlayer developer survey Help us build the nerdiest .NET thing, Hastlayer: It turns performance-critical sections of .NET programs into computer chips! If you fill out our short questionnaire you can win a cool compute accelerator board worth $265! Check it out here: https://forms.office.com/Pages/ResponsePage.aspx?id=Wt6elek45kStyIVVO-uCIMkFNjqW2E1Pm4v3YMcflMNUOVlDNUE3MlpDS044VDI1OEFSMUgxUkxSTC4u The reason we're asking this is that we're building a .NET hardware accelerator, Hastlayer (https://github.com/Lombiq/Hastlayer-SDK it turns your program into a chip!) and want to better understand what other developers do. Thank you in advance! Orchard Dojo Newsletter Now we have 113 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!

Sortable lists, IScopedDistributedCache - This week in Orchard (17/01/2020)

Get ready for a deep dive! In our post, we will introduce the IScopedDitributedCache service and show how to use it in the RoleStore. And we are going to solve the mystery about do you need the Model prefix to access different kinds of properties of a model in Liquid and in Razor too? Orchard Core updates Document recipes new Lucene settings There is new documentation on the updated Lucene index settings. Now to create an index from a recipe, it's not just about passing the name of the analyzer. You have to provide the following: AnalyzerName: the name of the analyzer, that you want to use. IndexLatest: a boolean value that indicates that if you want to index the latest or just the published versions. IndexedContentTypes: the list of types you want to index. Re-use in some places the ContentItem Liquid property There was a change in the Liquid TemplateContext, that broke some properties, that are available in the templates. If your AliasPart, AutoroutePart or Workflows patterns don't work anymore, it's because of the previous change. Now, this issue has been fixed. For example in an Autoroute pattern that used to render the custom URL of the content type you could do something like: {{ ContentItem.DisplayText | slugify }} That will generate a nice text for your routes. But in some cases, you have to write {{ Model.ContentItem.DisplayText | slugify }}. Maybe using the Model prefix is collateral damage, but maybe it has a purpose. Anytime we have a Liquid template for a shape we do Model.ContentItem to get the ContentItem. In Razor everything is Model.Something. It has to be because in Razor we are doing C# and the current context is the page and the page is a class that doesn't have our properties like @ContentItem. So the only thing we could get is the @Model that is typed to the generic type of the RazorPage and Model will provide all the properties like the ContentItem. Because we do too much Razor, it could be possible that we reused this approach into some Liquid patterns. In Liquid it's not necessary to have the Model prefix. But it appears that there is already a way in Fluid to use a first-level model without a custom prefix (so we don't need a Model prefix), by setting the TemplateContext.Model property. In conclusion: in Liquid that is easier to write {{ ContentItem.DisplayText }}, you don't need the Model prefix. But in Razor, you have to use the Model prefix. Constraint admin controllers to mapped routes Since we can change the prefix of the admin route, we have to ensure that every admin controller's actions have the correct prefix to use. There is an implementation of the IActionConstraint, called AdminActionConstraint, that checks if we are in the admin and the route doesn't start with the admin URL prefix (_adminUrlPrefix), then it will create a warning log entry. So, the AdminActionConstraint applies a convention that restraints all AdminControllers or [Admin] controllers to use the mapped route only, and not the default route applied by MVC. Fix the recipes not found bug in the documentation We have a guide about how to create a new decoupled CMS Website using Orchard Core. It told you to add the OrchardCore.Application.Cms.Core.Targets NuGet package to your new ASP.NET Core project, because this package won't contain the themes. And when you do a decoupled CMS site you will don't need the themes, because you want to create your own front end. The issue is with this package on the master branch is that the setup doesn't contain any recipe in the RC1 version. The community fixed that bug for now, but it's just in the dev branch yet. So, if you follow the guide and you using the RC1 version of that package, when you arrive at the setup screen you will not be able to set up the site because there will be no recipe to choose from. Mitigation is to use the OrchardCore.Application.Cms.Targets package, that contains all the themes and recipes. Of course, in this case, you will get several unwanted themes, but you will not be blocked to continue following the guide. So, it's not the perfect solution, but when there will be a new version of Orchard Core, we can rewrite this back to use the OrchardCore.Application.Cms.Core.Targets NuGet. There is also a hint about if you are using the nightly builds of Orchard Core then you should use the Core package instead. Creating IScopedDitributedCache The main goal is to increase the performance of Orchard Core and try to make it faster from time to time. To measure that, check the blog posts Liquid template page and start to remove everything from there. Just to see how fast could be the performance if we didn't render anything. Then start to remove stuff from the controller that displays content. For example, let's take a look at the ItemController. This is the controller, that renders content items by default. Take a closer look at the Display method of this controller! It first loads the content item. If it's not there, we return a 404. Then we check the ViewContent permission for this content item for the current user. We return Forbid if they authenticated but don't have the proper permission, or return Challange if the user is anonymous. Now let's build the display! That will build a shape containing all the part shapes and everything for this content item. So, it will render the display of this content item and we send this shape to a view that will just call Display of the shape. That's what we do in this method. The thing that made it slow actually is that one which checks the permissions, the _authorizationService.AuthorizeAsync. The user is anonymous and checking that the anonymous users could see something was the bottleneck of the performance. For each display of the site, there would be a database query just to authorize the anonymous user to be able to see something. This is actually a regression. Once you remove this code the controller will be much faster. An authenticated user would have added Claims cached in the User object. But in the case of an anonymous user, nothing was cached. Each request for an anonymous user would ask the permission for the anonymous user from the RoleStore. The RoleStore would do a query all the time. There is a new service, called ScopedDistributedCache. The idea is to use a distributed cache, such that we would store the Roles document in memory if we have a single node or in a store that is shared across every node if you have multiple nodes. Scoped means if you do multiple queries on the same cache entry for the same request, then we will load it from the DistributedCache only once. That will be much faster if you have multiple queries. You can see the usage of the ScopedDistributedCache in the RoleStore. Instead of injecting the IMemoryCache (that puts everything in the memory that shared by all the request) here comes the IScopedDitributedCache. The code is much simpler with that: you just pass it an object. Check the GetRolesAsync and the UpdateRolesAsync methods of the RoleStore. Demos Make lists sortable with ordering setting Let's say you have a site that you set up using the Blog recipe. In that recipe you can find a Blog content type, that is used as a container of the Blog Post content items. To behave the Blog content type this way, you need to add the ListPart to it, which will add the list behavior. Here you could see a new option before the Contained Content Types list, called Enable Ordering. If you check this option you will enable the manual ordering of the items. Let's put a tick here! Now head to the Content -> Content Items page and select the one named Blog (or just simply hit Blog from the menu). Here you can see the list of the blog posts contained in this blog content item. Let's add more posts to it to see the power of this new feature! By using a simple drag and drop, you can set the order of the different items and save it on the fly. Check out the following GIF to see how the reordering works! This feature is under development, but you can find the code in this pull request. And don't forget to watch the recording about this demo, where you can also hear an informative discussion about some interesting questions to solve, for example, what about reordering content items that have a published and a draft version too? News from the community New Orchard Core site: Buzz Interactive Buzz believes that great digital products are built on intelligent strategy and outstanding technical abilities. They partner with vibrant clients and help them create future-proof platforms for web, app, and VR. And they use Orchard Core for their site! 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. Tell us about your .NET performance challenges! - Hastlayer developer survey Help us build the nerdiest .NET thing, Hastlayer: It turns performance-critical sections of .NET programs into computer chips! If you fill out our short questionnaire you can win a cool compute accelerator board worth $265! Check it out here: https://forms.office.com/Pages/ResponsePage.aspx?id=Wt6elek45kStyIVVO-uCIMkFNjqW2E1Pm4v3YMcflMNUOVlDNUE3MlpDS044VDI1OEFSMUgxUkxSTC4u The reason we're asking this is that we're building a .NET hardware accelerator, Hastlayer (https://github.com/Lombiq/Hastlayer-SDK it turns your program into a chip!) and want to better understand what other developers do. Thank you in advance! Orchard Dojo Newsletter Now we have 113 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!

Scoped Liquid TemplateContext, Template Azure Blob with Liquid - This week in Orchard (10/01/2020)

Updated Trumbowyg plugin, configure your Azure Blob and Data Protection with Liquid and many more improvements are waiting for you in our upcoming post. Did we forget to mention that Orchard Core is now on the Area 51 site of Stack Exchange? Orchard Core updates Upgrade to ASP.NET 3.1.0 Orchard Core now using the v3.1.0 of the ASP.NET Core framework. This version is included in Visual Studio 16.4.0, so if you are using at least this version, you can build your own solution using Orchard Core. Here you can read a great article about the new features of this release. Validate Site Settings BaseUrl property You can set up the BaseUrl of your site under the Configuration -> Settings -> General on the dashboard. If you enter a URL, which is a not fully qualified URL, you will get a validation error. So, here you need to enter an absolute URL. Template Azure Blob and Data Protection blob configuration with Liquid You can customize the base path of the Blob Storage for media, for data protection and also for the container that you want to use. These can use a template in Liquid. If you have some custom rules to name your container or the base path, then you can define it this way. You can have access to the ShellSettings and the ContainerName properties. This will give you all the flexibility you need for instance to use the same container for all your tenants and then use a custom folder for each tenant. Or a custom container for every tenant and then the same path. You can also ask for the container to be created and it will be done when the tenant is started. You can read more about this feature in the documentation. Trumbowyg 2.21.0 and resizimg plugin Orchard Core using Trumbowyg, a lightweight WYSIWYG editor, that makes easier to edit your HTML content. Thanks to Antoine Griffard, Orchard Core now using version 2.2.10, including the resizimg plugin. For instance, when you set the Trumbowyg as the editor type of your HtmlBodyPart and insert a media with URL, you can just simply set the size of the image with a friendly user interface. Use GetLanguageDirection method everwhere When you check the content of the OrchardCore.Localization.Abstractions module, you will find a GetLanguageDirection extension method in the LanguageDirection static class. This method is used to get the language direction for a given culture. So, if we have an extension method like this, let's use it everywhere in the code. For example, check the code of the CultureDir extension method in the RazorHelperExtensions class, where you can see an example usage of the GetLanguageDirection method. Fix localization accessors names In ASP.NET Core we have many ways to use localization. The IStringLocalizer interface represents a service that provides localized strings and the IHtmlLocalizer interface provides localized HTML content. In Orchard Core, we used T, S, H, TS and TH, so it's time to unify these names and avoid the confusion. From now in the source code, the S will be used for the IStringLocalizer and the H will be used for IHtmlLocalizer. When localizing the views, the name T will be used like before. Scoped Liquid TemplateContext The goal was to improve perf on the Liquid rendering because we were creating a new TemplateContext and resolving all the services for each template. Here the idea is to create a shared Liquid TemplateContext only once per scope for perf, on which we do once a shared contextualization and then a specific contextualization before each rendering. Shared contextualization is done once per scope: add scoped services in ambient values, call Liquid handlers to add more ambient/scope values and access strategies, add all scoped Liquid filters. Specific contextualization before each rendering: e.g contextualize the localizer with the current view context, update the specific model value and its access strategy. And there are many places where we add a ContentItem value to the Liquid scope, we could remove them because now most of the time it is already accessible through Model.ContentItem. Here you can see that there is no need to create a new TemplateContext and add the ContentItem and the Model to it, it's enough to just simply pass the MarkdownBodyPartViewModel. News from the community Orchard Core on Stack Exchange Area 51 Area 51 is the Stack Exchange Network staging zone, where users come together to build new Q&A sites. New site ideas are proposed, discussed, and the best go on to beta. There is a request on Stack Exchange to create a custom community for Orchard Core. If you want to create a community you have to push for an idea and people need to approve and follow that idea. For this, it's needed more people to join and every person can vote for 5 questions and create 5 questions so, the community can continue on to the next stage. If you are interested in, check the FAQ of the Area 51 site and feel free to join the proposal! Orchard Nuggets: How to use Orchard Core without the sample themes? Try to reference the OrchardCore.Application.Cms.Core.Targets NuGet package instead of the OrchardCore.Application.Cms.Targets in your ASP.NET Core web application, that will only add the TheAdmin theme to your solution. In our third Orchard Nuggets post, we show you the differences between these two packages! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Orchard Dojo Newsletter Now we have 112 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!

How to use Orchard Core without the sample themes? - Orchard Core Nuggets

Try to reference the OrchardCore.Application.Cms.Core.Targets NuGet package instead of the OrchardCore.Application.Cms.Targets in your ASP.NET Core web application, that will only add the TheAdmin theme to your solution. Orchard Core has many built-in themes that can be useful, for instance, if you are searching for a way about how to override your templates using Liquid or Razor. By checking the code of these templates you can see the different custom Liquid helpers and Razor tag helpers in action. But if you would like to deploy your application it could be unnecessary to add these themes to your solution. The Getting started with Orchard Core as a NuGet package page of the Orchard Core documentation mentioned to reference the OrchardCore.Application.Cms.Targets package. However, if you reference the OrchardCore.Application.Cms.Core.Targets you can modify your Startup.cs file the same way, but when you set up your application, you will only be able to use the Blank site recipe, that allows you to set up your site with additional pre-configured options, features, and settings out of the box. Head to the bottom of the content of the OrchardCore.Application.Cms.Core.Targets.csproj file, where you can see that only the TheAdmin theme is referenced. And the only difference is that the OrchardCore.Application.Cms.Targets referencing the themes also among with the OrchardCore.Application.Cms.Core.Targets project. This way you would get a smaller solution without the themes and have a smaller and faster-deployed app to your server with the complete CMS functionality! Did you like this post? It's part of our Orchard Core Nuggets series where we answer common Orchard questions, be it about user-facing features or developer-level issues. Check out the other posts for more such bite-sized Orchard Core tips and let us know if you have another question!