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

Featured tags

IIS
API
All tags >

Orchard Harvest 2024 Program, expose Content Fields Indexing via GraphQL for content field filtering - This week in Orchard (26/07/2024)

Fix Liquid script tag does not render custom attributes, and exposing Content Fields Indexing via GraphQL for content field filtering are the topics for this week. The full program of the Orchard Harvest conference, with all the speaker and talk details, is out! Without further ado, let's dive in! Orchard Core updates Fix Liquid script tag does not render custom attributes The following Liquid template line {% script name:"pdf.js", src:"/Vendor/pdfjs/build/pdf.js", type:"module", defer:"defer", at:"head", depends_on:"jQuery" %} renders in <head> as: <script src="/t4h/OrchardCore.Resources/Scripts/jquery.min.js"></script><script src="/Vendor/pdfjs/build/pdf.js"></script> As you can see, the defer and type attributes are missing. The issue was a missing clause in the ScriptTag.cs file. Expose Content Fields Indexing via GraphQL for content field filtering If you want to filter (with where) the value of content fields, you must implement a WhereInputObjectGraphType for it. There's no built-in way to filter content field values from GraphQL. We already have Content Fields Indexing to be able to run SQL queries for field values. The goal of this change is to build on that and expose such SQL indices in GraphQL too. The GraphQL module now allows for filtering content fields, making it easier to query specific content fields using GraphQL. This enhancement relies on having the OrchardCore.ContentFields.Indexing.SQL module enabled. Additionally, the GetAliases method in the IIndexAliasProvider interface is now asynchronous and has been renamed to GetAliasesAsync. Implementations of this interface should be modified by updating the method signature and ensuring they handle asynchronous operations correctly. To see this in action, we need to enable the mentioned Content Fields Indexing (SQL) module under Configuration -> Features. We also enabled the GraphQL feature to have the GraphiQL option under the Configuration menu for easier testing. The following example demonstrates filtering Product content types based on a numeric content field named Amount, which is attached to a content part named Price Part, where the Amount is greater than 10. Note that in our example the Price Part is collapsed with the prevent field name collision option enabled. You can set these if you edit the content part settings of the attached Price Part. As you can see, we have two products where the value of the Amount numeric field is greater than 10. News from the community Orchard Harvest 2024 Program The full Orchard Harvest program has finally arrived. This year’s program is packed with insightful sessions, engaging panels, and ample opportunities to connect with the Orchard community and to make Orchard Harvest the biggest Orchard Core event of the year. All sessions will be recorded and published on the Orchard YouTube channel after the event, so even if you can't make it live, you can see the sessions. However, being there live will allow you to ask the speakers, meet other community members, and have a lot of fun! All indicated times are local time in Las Vegas. After each session, you'll have a chance to ask questions, and we'll have a short break too. Here is a detailed schedule to help you prepare for the conference. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on this YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today and take advantage of early-bird pricing at Orchard Harvest Conference 2024. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 467 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting! The recordings of the latest meetings will be uploaded in the first half of August, stay tuned for videos!

Add supported_cultures Liquid filter, use TextArea in Markdown Field By default - This week in Orchard (05/07/2024)

Add supported_cultures Liquid filter and use TextArea in Markdown Field by default are the topics for this week. Don't forget that the registration for the Orchard Harvest 2024 conference is still open! Without further ado, let's dive in! Orchard Core updates Add supported_cultures Liquid filter The Culture context variable got new properties for fuller Liquid culture support: DisplayName, NativeName, and TwoLetterISOLanguageName. These are the same as their .NET counterparts. A new filter named supported_cultures was added to allow you to get a list of supported cultures. Let's see a quick example of using this new filter! We have a site set up with the Blog recipe. This recipe defines a Page content type by default with the Flow Part attached. We modified the content definition of this Page content type a little bit by removing the Flow Part and adding a Liquid Part to it. We did it under the Content -> Content Definition -> Content Types option and edited the Page content type. After that, we have to make sure that the Localization feature is enabled, to be able to add multiple supported cultures to our site. We can enable this feature under Configuration -> Features. And if you navigate to Configuration -> Settings -> Localization -> Cultures, you can add as many supported cultures as you want. Now, we can go back and create a new Page content item. As you can see, we utilized the new supported_cultures Liquid filter and printed the names of supported cultures using a list. Use TextArea in Markdown Field By default Before this change, the Markdown Field used a single-line input field by default (named the Standard editor) and offered two different editors: Multi-line with a simple textarea and WYSIWYG with a rich editor. Now, by default, it uses a textarea as the Standard editor, and the separate Multi-line option has been removed. You have nothing to do, fields configured with the Standard or Multi-line editors previously will both continue to work. Note though, that their editors will now be a textarea. To try this out, we simply added a Markdown Field to the predefined Blog Post content type. If you edit this Markdown Field, you may notice that there are two editor types: Standard and Wysiwyg. And if we create a new blog using the Standard editor type, you will get a Multi-line editor. News from the community Orchard Harvest 2024 date and location Get ready to power up your Orchard skills at Orchard Harvest Conference 2024! Join us on September 12th-13th at the Orleans Hotel and Casino in lively Las Vegas for two days packed with learning, coding, and community fun. What can you expect at Orchard Harvest Conference 2024? Hands-On Workshops: Elevate your coding game with interactive sessions led by industry experts. Insider Insights: Learn best practices, advanced techniques, and real-world insights from qualified developers. Global Connections: Connect with fellow enthusiasts, exchange ideas, and forge meaningful relationships within the Orchard community. Special Perks: Participants get exclusive discounts on accommodations at the Orleans Hotel and Casino. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on our YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today and take advantage of early-bird pricing at Orchard Harvest Conference 2024. This year's leading themes: Leading up to a v3.0, what will the future Orchard Core look like? What's the role of a CMS nowadays (with the decoupled/headless operating models, and AI development tools) Explore some advanced topics such as Shapes, Placements, Cloud Integrations, Performance, module extensibility, etc. Showcases on implementing Orchard Core in action. Want to support our mission? Become a sponsor! Reach out to us at [email protected] or [email protected] to explore sponsorship opportunities. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 470 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Add HTML support to notification summary; how to change the idle logout time in Orchard Core? - This week in Orchard (03/05/2024)

Add HTML support to the notification summary, implement local storage emulator support for the Amazon S3 Media module, and in our newest Orchard Core Nuggets post, we discover how to change the idle logout time in Orchard Core! Without further ado, let's get started! Orchard Core updates Add HTML support to the notification summary Let's say you need a way to be able to make notifications clickable on the UI. For example, you want to create a notification for when a content is published. When the user clicks on the notification, you want them to get redirected to the published content item. Currently, there is no way of doing that since we use the property Summary as an email subject which can't contain HTML. The INotificationMessage interface was updated to include the addition of a Subject field, which facilitates the rendering of notification titles. Moreover, the existing Summary field has been transitioned to HTML format. This adjustment enables the rendering of HTML notifications in both the navigation bar and the notification center. Consequently, HTML notifications can now be created, affording functionalities such as clickable notifications. Furthermore, the introduction of the NotificationOptions provides configuration capabilities for the notifications module. This structure comprises the following attributes: TotalUnreadNotifications: This property determines the maximum number of unread notifications displayed in the navigation bar, with a default setting of 10. DisableNotificationHtmlBodySanitizer: By default, the HtmlBody of notifications generated from workflows undergoes a sanitization process. However, this property grants the option to bypass this sanitization process. Implement local storage emulator support for the Amazon S3 Media module Following the docs, you can only use the Amazon S3 Media module with a real, online S3 resource. For daily development, especially in a team, using a storage emulator is better though. This is currently an issue only for the Amazon Media Storage feature. With the AWS SDK version we use currently, and due to us using virtual host addressing for buckets (i.e., mybucket.localhost, as opposed to path-style addressing with localhost/mybucket) this wasn't actually possible, so we needed to implement support for it too. If you open up the Orchard Core docs page, you will find a section that helps you configure a local emulator by setting up a ServiceURL. The page also mentions two tools known to work with the mentioned settings. News from the community Orchard Core Nuggets: How to change the idle logout time in Orchard Core In our latest post in the Orchard Core Nuggets series, we discover how we can constrain how long people can remain logged in: If they share a device, especially a public one, then it's better to be on the safe side and automatically log them out after some time of inactivity. Check out the other posts for more such bite-sized Orchard tips, and let us know if you have another question! Theme development with Zig - Orchard Core Pair Programming by Lombiq This is the very first session of Orchard Core Pair Programming by Lombiq! In these, we do an hour of pair programming with an Orchard Core community member about a project of theirs. We learn together a lot, share best practices, and write some good code. All this is live, and you can join us with your questions! This time, Ermir Pellumbi aka Zig will join us with a theme project. Your host and the "navigator" of the pair programming session will be Zoltán Lehóczky from Lombiq. Check it out here: https://youtube.com/watch?v=RdE6Io 5 PM UTC on the 6th! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 470 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Orchard Harvest 2024 survey, Lombiq Login as Anybody for Orchard Core - This week in Orchard (09/02/2024)

Use the file name instead of the technical name in the Media Field, add Environment accessor in Liquid, a demo about our Login as Anybody module, and a survey about the upcoming Harvest conference! We have a lot to cover today, so let's get started! Orchard Core updates Use the file name instead of the technical name in the Media Field When selecting a file using the attached Media Field, it shows the technical name, which is not user-friendly. With this change, we use the uploaded file name if it exists. Let's try it out quickly! If you set up your site using the Blog recipe, it will create a predefined Blog Post content type. That content type has one Media Field called, Banner Image. We uploaded a new image to the Media Library (Content -> Media Library) and will use that for the predefined Blog Post content item. Once we select our file and click on it, you can see the Media Field displays the file name (Loki.jpg) instead of its technical name. Add Environment accessor in Liquid Currently, you can't check if you are in the Development or the Production environment in Liquid. This change introduces a new environment accessor in Liquid which represents the current hosting environment. The following properties are available on the Environment object as mentioned in the docs: IsDevelopment: Checks if the current hosting environment name is Development. IsStaging: Checks if the current hosting environment name is Staging. IsProduction: Checks if the current hosting environment name is Production. Name: Gets hosting environment name. Here, we have created a new template under Design -> Templates with the name Content__BlogPost. This template is called when displaying the Blog Post content item with the Detail display type, for instance, when accessed from its URL. We have one predefined Blog Post content item so we will use that one for testing purposes. The template itself is straightforward, we just print the name of the environment and two boolean values, as you can see in the screen below. Demos Lombiq Login as Anybody for Orchard Core This demo is about the Lombiq Login as Anybody module for administrators to be able to log in as any user. This feature is only available to site owners, thus it's no way to get around security. It's time to see this feature in action! The easiest way is to clone Lombiq's Open-Source Orchard Core Extensions solution. This Orchard Core Visual Studio solution contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries, containing the Lombiq Login as Anybody module too. Let's run the Open-Source Orchard Core Extensions solution and head to Configuration -> Features to enable the Lombiq Login as Anybody feature. After enabling the module you'll see a new button on the Security -> Users page. You can log in as any registered user there. This is useful if you want to see how your Orchard Core app behaves for certain users. Here you can see that we are logged in with the admin user, and the Log in as user button appears near the two other users on the list. Once you hit that button, you will be logged in as the selected user and will be redirected to the homepage of the site with a notification "Successfully logged in as {UserName}." If you want to see a short demo of this feature, don't forget to head to YouTube for a recording! News from the community Orchard Harvest 2024 survey For those too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last in-person one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should think about organizing the next in-person one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. After last year, the Orchard Harvest Conference will be held again in 2024. Last year it was held online due to economic reasons. But first, we would like to assess the potential interest and what would be needed. You can fill in the questionnaire here, which should take about 5 minutes. Share your thoughts with us in the survey. We are curious about who we will meet in 2024! :) Work with Lombiq! Do you like developing apps with Orchard Core? Would you like to apply your skills to some of the most challenging Orchard Core apps out there, working with other OC experts? Then come work with us at Lombiq, the biggest Orchard Core team in the world! We've been contributors, supporters, and users of Orchard Core and Orchard 1 for more than a decade (Benedek Farkas and Zoltán Lehóczky, the two founders, for even more), with a huge open-source portfolio. There you can also check out the code we write, and some of the projects you could take part in. We do a lot. Ready for keywords? Open-source, Orchard Core CMS, .NET software development, ASP.NET Core MVC, distributed team, cloud-first, Microsoft Azure, self-funded R&D, Vue.js, jQuery, Bootstrap, SASS, training, hosting and operations, GitHub Actions, TeamCity, support, SaaS (the only Orchard CMS SaaS, DotNest), Selenium UI testing, xUnit, university courses. And also, greenfield experimental projects like Hastlayer, turning software into computer chips. Write to us at [email protected], and let's talk! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 479 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

How to migrate an Orchard 1 application to Orchard Core, support login via username or email address for OpenID - This week in Orchard (28/07/2023)

Support login via username or email address for OpenID, Liquid themes shouldn't need Razor support for MVC, and don't forget to take a look at our blog post about how to migrate an Orchard 1 application to Orchard Core! Check out our post for the details! Orchard Core updates Support login via username or email address for OpenID When using the built-in OpenID feature of Orchard Core, you can get an access token by making a POST request to /connect/token endpoint. In the request, you can specify the grant_type, scope, username, password, and client_id. You can use the username in the username parameter, but if you try to use the email address of the user, it won't work. According to this discussion thread, there is a change to not allow the username = email. However, there should be a fallback to authenticate by username or email. So, the goal of this change is to be able to use a username or email to log in. As you can see, now the code utilizes the updated GetUserAsync method, which gets the user by a specified username or email address. Liquid themes shouldn't need Razor support for MVC When developing a theme, you can decide to use Razor or Liquid files. But of course, you can mix Razor and Liquid files if you want. Originally the Blog Theme was only composed of Razor files that the community migrated step by step to Liquid. And we are only using Liquid files for the Agency Theme and the Coming Soon Theme as well. So, these are themes that currently only use Liquid files. And because of that, we can remove the AddRazorSupportForMvc tags from these themes. News from the community How to migrate an Orchard 1 application to Orchard Core You may have heard about the news that we migrated from our old Orchard 1 website to Orchard Core and modernized our site's look. Our new site turned out great, and we are very happy with it. It represents who we are and what we do as a company. We hope you like it too! For our case study on building the renewed Lombiq.com, including migrating it from Orchard 1, check out How We Renewed and Migrated lombiq.com from Orchard 1 to Orchard Core in the Lombiq blog, and check out this announcement in this video. If you are also planning to migrate your Orchard 1 website to Orchard Core, and want to read more details about how you could start to migrate your website and content, search no more, we have published a detailed article on Orchard Dojo with some samples as well about how you could start and enjoy the numerous remarkable benefits by migrating to Orchard Core. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 491 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Admin Culture Picker, Health Checks Module - This week in Orchard (31/03/2023)

Add Culture Picker for the Admin Site; a new version of Fluid, and a demo about the Health Checks Module! Check out our post for the details! Orchard Core updates Add Culture Picker for the Admin Site Unless you have a language switcher on website pages you cannot switch a language in the admin panel. This can be solved by having a dropdown in the admin panel header to switch languages. If you head to Configuration -> Features and type "culture", you will see two features: Admin Culture Picker which provides a culture picker shape for the admin area. Content Culture Picker which provides a culture picker shape for the frontend. The first one is the new one, so enable the Admin Culture Picker feature! After you enable this feature, probably nothing will change. But why? Well, that's because if your site only supports one culture, there is no need to display a culture picker to choose from the different cultures. So, let's navigate to Configuration -> Settings -> Localization and have at least two different supported cultures. After that, you will see the new dropdown in the NavbarTop zone of the admin theme which you can use to switch between cultures. Fluid 2.4.0 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 to 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. Fluid 2.4.0 has been released this month, so let's see some of the changes that this release contains! This release contains the implementation of some missing strftime formats. You can write: var source = "date:"{{Date | date:'%F %T.%3N'}}""; which results date:"2022-12-19 14:23:02. %3N". And as you can see, the %3N does not take effect. So, now all of these formatting parameters are implemented in Fluid meaning you can have more ways to print formatted dates. Like adding support for formats that will depend based on the first day of the week. Or if you ask for the number of weeks of the current day, then it might depend on what is the first day of the week. And there is a standard like Monday but sometimes you say that Sunday is the first day of the week. Another change is to introduce a "local" time zone for the time_zone filter. Meaning if you want to use a time zone that is the local time zone of the configuration (in Orchard it would be configured as the standard time zone), then you can use "local". Because you might get a UTC date and you want to display it with the local time zone. To do that, you can do: {{ now | date | time_zone: 'local' }}. Demos Health Checks Module For this demo, we will clone the following GitHub repository which contains a set of modules for Orchard Core CMS that is driven by the community members who love Orchard Core. This will encourage all the passionate developers to build modules that aren't included in Orchard Core. Such modules may be necessary for the community or essential for any sort of CMS. This repository contains several modules, this time we will check out the one called Health Checks Module, which provides health checks for the website. Orchard Core has a built-in Health Check module, the goal of this one is the extend the functionality of the built-in one. If you run this repository and enter the admin site using the admin username and admin@OCC123 password, you can navigate to Configuration -> Features and enable the Health Checks module. And while we are here, let's also ensure that the SendGrid module is enabled. But why? Because the Health Checks module is capable of checking the status of the SendGrid module. If you navigate to /health/sendgrid, you will see an Unhealthy message. Meaning that the SendGrid module is available and could be used without any issues but you have to configure its settings to make that service available for the users. Try to enable the Multitenancy feature as well and create a new tenant but do not set it up, just create it. After, head to the /health URL and see what it shows. Here you can find the status of SendGrid as before and another one called Tenants Health Check. As you can see, the name of the tenant that we have just created is Blog, but we haven't set it up (just created it), that's why you can see an Unhealthy status here. You can see the System Updates Health Check here as well because we enabled the System Module last week. And as always, if you would like to learn more about this module, don't forget to check out this recording on YouTube! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 434 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Fluid.Core 2.3.0, add Content Field handlers to enforce validation in the content API - This week in Orchard (23/12/2022)

Fluid.Core 2.3.0, add Content Field handlers to enforce validation in the content API, and please help the community to decide whether to merge the Responsive Admin Theme or not. Check out our last post for this year! Orchard Core updates Fluid.Core 2.3.0 The 2.3.0 version of Fluid.Core is here and merged into Orchard Core. Let's see some of the important changes in this version! The first one is adding support for TimeSpan. Now, if you have a C# TimeSpan object that you pass in a model, it's converted to a DateTime starting from 1970. The second one is adding replace_last and remove_last filters. These are standard Liquid filters that can now be used in Fluid as well. Fluid now targets .NET 7.0. When you go to NuGet.org and search for the Fluid.Core package, you will see that the latest version of this package now also targets .NET 7.0. Let's continue with the one about fixing the case/when tag multi-statements evaluation. In Shopify Liquid a case will return multiple expressions if multiple conditions are met. This can happen because a when can contain multiple values. In Fluid the first condition that is true will return the expression and then exit the case in the same manner that a SQL "case" works. If you check out this screenshot, you can see the Liquid behavior on the Shopify API. Now Fluid supports this behavior. Add Content Field handlers to enforce validation in the content API When creating content using the Contents API, the content is stored as the user sends it without any kind of validation. For example, if you create a type with a required TitlePart, and post a new item with no title, the content item gets created with no title. Here the goal was to implement the ValidatingAsync method in every part/field handler so that way, each part/field is validated against its own settings. Also, add field handlers to be called so we can validate fields. So, to summarize this addition, this is about adding a way to attach handlers for fields. For example: services.AddContentField<TextField>() .UseDisplayDriver<TextFieldDisplayDriver>() .AddHandler<TextFieldHandler>(); // this was added TitlePartHandler was modified to validate the part against the TitlePartSettings. New handlers were added: TextFieldHandler to validate a text field. One handler for each part/field will be added "if it does not exist" which would implement that ValidatingAsync(...) event. This would be part of a follow-up PR to ensure the team is in agreement with the approach and to reduce the code change. News from the community Help the community decide whether to merge the Responsive Admin Theme or not Last month you could see a demo of the Responsive Admin Theme where one can change the look of the forms. Now we need to decide whether we want to merge this PR or not for the reasons explained in the meeting where the feature was demoed (and also in the meeting on 12/20/2022). To vote please use reactions for this comment (not on a new comment please, but you can still comment on the PR on top of it). The limit for the vote will be January 3rd, 2023. Thank you! Christmas in Lombiq Sometimes we do stuff. Together. Not (just) in front of computer screens. These are some usual events in Lombiq that are all announced and arranged in advance. We periodically have an event called RnDay: this is a few hour-long event where we share with each other what we recently worked on and what we plan to do. E.g., If we recently finished a project, then the project's team members demo what they've done. We had our last RnDay for this year in the Aranytíz Budapest, which is an event space where we held this event. And at the end of the day, we visited a nearby restaurant to have dinner together. We would like to thank you all for reading our posts and making the Orchard community stronger together with us! We hope that we can give you valuable news and demos about the happenings around Orchard and Orchard Core from time to time by reading our posts and of course the This week in Orchard newsletter. We would like to wish everyone a Merry Christmas and a Happy New Year with some photos of our latest event! Orchard Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 379 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is 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 about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Add a way to retrieve a UTC now DateTime in Liquid, Responsive Admin Theme - This week in Orchard (04/11/2022)

Add a way to retrieve a UTC now DateTime in Liquid, change the Query Schema editor to Monaco Editor, allowing multiple INavigationManager, and a demo about the responsive Admin Theme! Let's get started! Orchard Core updates Add a way to retrieve a UTC now DateTime in Liquid Orchard Core has a new Liquid helper called utc, which converts a local date and time to the UTC date and time based on the site settings. Let's say we type in the following expressions: utc: {{ "utc" | local | date: "%c" }}local : {{ "now" | local | date: "%c" }}local is the default : {{ "now" | date: "%c" }} This will appear as follows. You can see the current date time in UTC and in the site time zone as well. This new helper is also added to the documentation of Orchard Core. Change the Query Schema editor to Monaco Editor If you have a site set up with the Blog recipe, you have one predefined query, called RecentBlogPosts. You can edit this query under Search -> Queries -> All queries. And as you may notice, the schema editor now uses the Monaco Editor that powers VS Code too. Allowing multiple INavigationManager In the past, if you were trying to have multiple INavigationManagers, you could not do that because the TryAddScoped is replacing the existing implementations. So, to be able to have multiple INavigationManager implementations, you have to use TryAddEnumerable, which adds a ServiceDescriptor if an existing descriptor with the same ServiceType and an implementation that does not already exist in services. And here, you can see that the NavigationShapes class can now handle multiple INavigationManager implementations. Demos Responsive Admin Theme This demo is about a feature that you can see in this pull request to make the Admin Theme responsive. First of all, you can see that fields are listed with the title being at the start point, in this case on the left. So, if you have an RTL text direction, it will be on the right. The cool thing about this is that you utilize more of the width of the screen when the screen is large and you reduce the scrolling if unnecessary. But if you have a smaller screen, the labels go back to the top as what you used to see. We have the same thing for content parts as well. Here you can see how everything appears if you have a wide or a narrow screen. But not everybody may like to see the labels on the left like this, it means this is optional, and by default, nothing will change unless you explicitly change it. This one was done by adding a new StyeSettings section under the TheAdminTheme section to the appseetings.json where you can define classes. If you chose to utilize this, you can add a setting per tenant, and you can customize the look and feel of the Admin Theme for every tenant. And how does this work is the classes are placed by helpers. Let's check out the TitlePart.Edit.cshtml for example. As you can see, the GetLabelCssClasses() and GetEndCssClasses() Orchard helpers read the settings and apply the class names that you have provided in the appsettings.json file. This means that if you want to use this feature, your custom views have to be updated to utilize these helpers. And all the new built-in views of the source code of Orchard Core have to use these helpers in the future. 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 Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 386 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is 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 Orchard meeting!

Fluid Functions, Lombiq Training Demo updates - This week in Orchard (04/02/2022)

Fluid provides optional support for functions, optimizing SlugServie and MediaTokenService, and hiding a shape sample in the Lombiq Training Demo for Orchard Core are the topics of this week. Check out this post for the details! Orchard Core updates Optimize SlugService The goal here was to increase the performance of the SlugService as much as we can. Marko Lahma went through the thing, and the problem was that the ZString haven't been used, it was leaking all the time thus bad perf. BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores.NET SDK=6.0.101 [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT DefaultJob : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT General easy rule (when implicit usings aren't being used): If there's using System.Linq; at the top of the performance-critical code, try to find a way to get rid of it. Reduce allocations in MediaTokenService and improve performance Since Orchard Core can use all .NET 6 goodness, Marko Lahma improved the performance of the MediaTokenService too. And what did he change? Don't ToString StringValues, keep them as-is as in dictionary once built. Parse commands and other commands with one pass using constructs that QueryHelpers uses. Allocate static command arrays to return from processors, some of them were always returning new ones. Change GetHash not to allocation anonymous closure each time by using Try/Set construct, using the same logic that extension method GetOrCreate uses. Change hash calculation to use stackalloc and spans for workloads < 1024 bytes (common case). Use the custom AddQueryString method that understands spans and concrete a dictionary type. Here you can see the numbers: Before: After: Fluid functions Now there is a new optional feature in Fluid called Functions. It's optional because the goal of Fluid is to be able to as close as possible to Liquid, but Liquid doesn't have Functions. If you open up the readme file of Fluid, you can see a new section there called Functions. There is a new option in the FluidParser that you can say AllowFunctions. By setting the AllowFunctions to true, you can call functions like this: {{ field('user') }}. The format of this one is {{ identifier('arguments')}} just like in JavaScript or in C#. Or you can say {{ field('pass', type='password') }} which is like {{ identifier('values', type='named value') }}. How it works is a field is an object, a FluidValue of type FunctionValue. In Fluid, anytime we access something like {% assign name = "Bill" %}, the name is a FluidValue, and in this case, the type is StringValue. When we find a field, the field is a value of type FunctionValue, and the FunctionValue implements the method name InvokeAsync. There is InvokeAsync, there is GetPropertyAsync, etc., everything that an object can do, and when this FunctionValue's Invoke is invoked it will execute something. And to invoke a FluidValue you use parenthesis. If we do parenthesis on something like name, which is a string, we can do name(), it will invoke the string, but it just returns NIL value. So you can invoke name if you want, it will not do anything. If it's a function, it will do something. To learn more about Functions, check out the documentation of Fluid! News from the community Hiding a shape sample in the Lombiq Training Demo for Orchard Core The Lombiq Training Demo for Orchard Core is a demo Orchard Core CMS module for training purposes guiding you to become an Orchard developer. And the module has a new sample, which is a shape table provider that hides shapes. Check out the code of the new ShapeHidigingShapeTableProvider here! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 240 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 is 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!

Fluid updates, Better NRE handling for Widget and MenuItem stereotypes - This week in Orchard (07/01/2022)

Topics for this week are the Fluid updates; better NRE handling for Widget and MenuItem stereotypes; allowing sending emails without "To" if "Cc" or "Bcc" is provided. Do you want to know more? Then check out our post now! Orchard Core updates Allow sending emails without "To" if "CC" or "BCC" is provided Let's say you have a system to send emails to many recipients at once and want the recipients to be in the BCC header instead of the To one. The email module of Orchard Core was required to have at least one recipient in the To header, so, the scenario described above cannot be implemented in Orchard Core. The solution for this is that now you can send an email without a recipient in the To header. The mail message should have at least one of these headers: To, CC or BCC. Here you can see the editor of the Send Email task where we provided an email address for the BCC header but kept the To and the CC headers empty. Fluid v2.2.8 In Liquid, you can have an identifier that starts with a number like: {% assign 1st = "first" %} {{ 1st }} It was not easy to parse, but now Fluid supports this one with version 2.2.8. And just a note here. If you navigate to the Liquid Sandbox of Jumpseller, you can find a sandbox that is using Liquid but in Ruby, which is the actual implementation of Liquid. You can use LiquidJs to test, but that is a custom implementation in JavaScript, so it might not be as true as the Ruby implementation. Better NRE handling for Widget and MenuItem stereotypes As you may guess, the NRE handling is about catching the null reference exceptions and showing proper error messages instead of displaying the "An error occurred while executing this request.". What were those errors? For example, follow these steps: Create a new content type with stereotype = MenuItem. Add a menu item of that type to a menu. Delete the content type created in step 1. Go back to the menu you created in step 2. Observe a Null Reference Exception. Here we created a new content type with the MenuItem stereotype called NewContentType. The site that we are using was set up by using the Blog recipe, so we have the Main Menu admin menu where we can easily add menu items by just clicking on the Add Menu Item button. And if we delete the NewContentType and navigate back to the Main Menu, we will see the following messages instead. News from the community Lombiq's Open-Source Orchard Core Extensions now updated to Orchard Core v1.1 Looking for some useful Orchard Core extensions? Here's a bundle solution of all of Lombiq's open-source Orchard Core extensions (modules and themes). Clone and try them out! This is an Orchard Core CMS Visual Studio solution that contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries. Please keep in mind that only those extensions are included which use the latest released version of Orchard (i.e. the very cutting-edge ones depending on a nightly build are not yet here). And this project, with all of our Orchard-related projects, is now updated to Orchard Core v1.1! Check it out here! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 235 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 is 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!