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

Featured tags

IIS
API
SMS
SEO
All tags >

Lombiq Privacy for Orchard Core, Target .NET 6 by default - This week in Orchard (19/11/2021)

New guide to the document, new asset_url Shortcode, targeting .NET 6 by default, and demo about the Lombiq Privacy module for Orchard Core. Do you want to know more? Then don't forget to check out our current post! Orchard Core updates Add [asset_url] shortcode The new asset_url Shortcode can be used to render the image URL only. Let's see a short example for this one. We have a site set up with the Blog recipe, and we decided to create a new blog post. The blog post content type has a MarkDownPart attached that supports using Shortcodes. You can type the [asset_url][/asset_url] by yourself, or just easily click on the Insert Shortcode icon and find the asset_url one in the Media category. Make sure you have some content in your Media Library and enter the file name of the asset. We have an Orchard Core logo at the root of the Media Library with the file name orchard-core-symbol-logo-color.png, so let's use that one.As you can see, if we provide the file name, the asset_url returns the relative URL from the site's media library. You can see we have a tenant here with the name blog1 and the file is in the root folder of the media library. If you would like to know more, head to this page of the Orchard Core documentation, where you can read about the parameters that you can use with this Shortcode. New how-to guide: creating the pieces needed to query content based on assigned taxonomies If you head to this page on the Orchard Core documentation, you will find a new guide for creating a query that allows searching across multiple assigned taxonomies. At the end of the guide, you will have the pieces needed to search through blogs to find only the ones with specific tags assigned. Target .NET 6 by default .NET 6 was released on the 8th of November and the community already updated Orchard Core to use .NET 6 by default. So, the main branch targets .NET 6 by default which means if you clone that branch, you will need to have the .NET 6 SDK. If you go to dotnet.microsoft.com, you can easily download the latest SDK. Orchard Core now also builds and runs the tests using .NET 6. The targets are defined in the CommonTargetFrameworks of the Dependencies.AspNetCore.props file, where you will see .NET 6, .NET 5 and .NET Core 3.1. By default, if you open Visual Studio, it will target .NET 6, but when you build on the command line, you can define which target you want. So, if you want to publish a self-contained, you can do --framework and provide the framework you want or change the value of the DefaultTargetFramework property. The same applies to the Docker deployments. And one reminder: if you are using Visual Studio and want to use .NET 6, you will need to download Visual Studio 2022 because Visual Studio 2019 has no support for .NET 6. Demos Lombiq Privacy for Orchard Core The Lombiq Privacy for Orchard Core is an Orchard Core module containing features related to data protection/privacy and the EU law on it, the General Data Protection Regulation (GDPR). In this demo, we will go with the quicker way and use our Open-Source Orchard Core Extensions full Orchard Core solution that contains that module. If you clone that repository and set up your site using any setup recipe, let's just navigate to the admin UI of Orchard Core, and under Configuration -> Features, enable the following features: Lombiq Privacy - Consent banner that adds the ability to show a privacy consent banner. Lombiq Privacy - Form consent that provides the Privacy Consent Checkbox widget that can be used on any form. Lombiq Privacy - Registration consent that adds a privacy consent checkbox to the registration form. Now, if you navigate to Configuration -> Settings, you will find three new options there: Privacy Consent Banner Settings, Privacy Consent Checkbox Settings, and Privacy Registration Consent Settings. If you click on the Privacy Consent Banner Settings, you will find a simple editor with Liquid support, where you can set the content of the consent banner. By using the consent banner feature, users can accept the privacy policy. If the user is unauthenticated, they can use the banner to accept or reject the privacy statement, their decision will be stored in a cookie by the browser. If the user is authenticated, their only option is to accept the privacy policy via the banner. This is so because it is assumed that during registration, they already accepted a suitable privacy policy, it's just that the Lombiq Privacy module or something similar wasn't used at the time. Another new option here is the Privacy Registration Consent Checkbox Settings. The Registration Consent Feature shows a privacy consent checkbox on the registration form that needs to be checked by the users to be able to register. After registration, the user's consent is stored in the PrivacyConsent section of the user's properties. Here you can define the label of the checkbox. And the last one is the Form Consent Feature which adds a new Privacy Consent Checkbox widget content type that can be added to forms with the Forms module. In this case, users must accept the privacy policy before they can post content to the site. You can validate the consent with the Validate Privacy Consent Checkbox workflow activity. The way of how to do it can be seen in this Contact Form submitted workflow. When we get an incoming POST request, we check the validity of the Privacy Consent Checkbox, and based on the result, we redirect the user to different URLs. And if you check out the editor of the Page content type which has a Flow Part attached, you can see we added a Form widget there, and inside the Form, we placed our Privacy Consent Checkbox widget. And as usual, if you would like to know more about this new module, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 231 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!

Orchard Core 1.1 release, Dynamic style Content Field - This week in Orchard (28/10/2021)

We are thrilled to announce that Orchard Core 1.1 is now available! Check out this post to know everything about the latest release of Orchard Core and see a demo about a great third-party Orchard Core module that provides a dynamic styling content field for Orchard Core! Let's get started! Orchard Core updates Add Media background checkerboard pattern for transparent images Let's say that you have a site set up with the Blog recipe and you want to change the Banner Image of the predefined blog post. It's a possible scenario that you upload a PNG or a GIF file that has transparency. But the transparency of the selected image couldn't be easily seen because the admin theme has no support to show that the given image has a transparent background. To fix this issue, now you will have a background checkerboard to easily see the transparent parts of the image, that works in dark mode too. Here you can see that we uploaded and selected an Orchard Core logo that has a transparent background. Add Total support for Lucene API queries The change is just to return whatever the query object is returned from the query API, and it might contain more than what the interface exposes, which is just the items. For instance, Lucene can return the number, the total items. SQL won't do that because that's too costly. Demos Dynamic style Content Field The ThisNetWorks.OrchardCore.Styles module provides a dynamic styling Content Field for Orchard Core. The repository contains a sample project which includes custom configurations for the CKEditor toolbar. In this demo, we will clone the mentioned repository and run the solution inside. Set up your site using the Styles sample recipe that allows you to set up your site with additional pre-configured options, features, and settings out of the box. First of all, let's navigate to Design -> Style Schemas. A style schema defines how the Styles field will be edited, and which components will be available. Open up the one called H2 Color. As you can see here, we defined a component schema. At its most basic a schema entry must contain a reference to a Vuejs component and the description of how to render its entry as CSS. The renderer can be either a renderer name, e.g., "renderer": "CssSizeEntry" or a LiquidJS template for more complex schemas. Here the template says that set the color of the h2 tags to the #8bc34a hex value. Before moving forward, let's check out the content definition of the Style Guide content type that comes from the Styles sample recipe as well (Content -> Content Definition -> Content Types -> Style Guide). As you may notice, this content type has three Style fields attached. Now let's focus on the one with the display name Heading 2. Every Style field can have a selected style schema (H2 Color in this case), or you can select the Custom schema option from the drop-down to say I don't want to use a given style schema, I would like to define the schema here for this Style field. Now check out the predefined Style Guide content item. As you can see here, we have an h2 tag with the heading 2 text. And because we attached the H2 Color style schema with the Heading 2 Style field, when we render the content of this content item, the color of the text inside the h2 tag will be using the #8bc34a hex value. You can find other style schemas on the site, like the Css Variables one. Here you can see a range of CSS vars for the site. The BorderRadius adds rounded corners to the given elements. Here you can see we defined the value of the radius using rem. If you scroll back to the Style Guide content item, you will see that here we defined a my-sites-button class with a border value. The border-radius: var(--border-radius); means to use the defined BorderRadius value from a style schema. And here, you can see the usage of other variables from the style schemas like the button-background-color-hex, where you can easily say button-background-color-rgb as well if you defined the rgb value too. Here button is the name of the component, background-color is the name of the schema with a predefined hex and rgb colors. Now, if you open up the Style Guide content item, you will see something like this. Here you can see the color of heading 2, the border-radius of the buttons, and every other style that we defined using style schemas and attached them to our content type by using content fields. If you check out the README.md file of the repository, you will find nice, detailed documentation about the properties that you can use inside the schemas. And as always, you can find a recording about this module on YouTube to see this feature in action! News from the community Orchard Core 1.1 Orchard Core 1.1 is released! If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the newest released version of Orchard Core! Upgrade your solution to 1.1 now! Feel free to drop on the dedicated Gitter chat or use the Discussions on GitHub and ask questions! Reusable tests in Lombiq UI Testing Toolbox The Lombiq UI Testing Toolbox is a web UI testing toolbox mostly for Orchard Core applications. Everything you need to do UI testing with Selenium for an Orchard app is here. UI Testing here is an automation that clicks through the web application in a browser. One of the most popular frameworks for that is Selenium, which does exactly that. You get an API to instruct a browser, and every major browser is supported. This UI Testing Toolbox provides a lot of features on top of Selenium for Orchard Core. Basically allowing you to UI test an Orchard Core application in a safe and parallelized way providing a lot of helpers, a lot of higher-level APIs allowing you to test your application with SQLite, with SQL Server with local media storage, or with Azure Blob Storage. And you can have a test e-mail sent with a local SMTP server too. Everything just works. Check out the highlights of the Readme.md file of this repository to see all of the features! We had a demo about the UI Testing Toolbox a few weeks ago. If you haven't seen it yet, check out this This week in Orchard post! And the UI Testing Toolbox just got something very useful: Reusable tests to check that basic Orchard Core features work, like login, registration, and content management. Make sure your Orchard app's basics work! Check out the sample here! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 231 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!

Fixing rendering of helper and block tag helper, Bynder for Orchard Core - This week in Orchard (21/10/2021)

Fixing rendering of helper and block tag helper, documentation for the Feature Profiles, OpenID improvements, and demo about a module that integrates Bynder for Orchard Core! Don't forget to check out our current post to know more! Orchard Core updates Documentation for Feature Profiles Last week we had a demo about the new Feature Profiles feature. If you haven't seen the demo video about that feature or you haven't read about it yet, you should check out our previous post! In the meantime, the Tenants page of the Orchard Core documentation has a new section that describes everything you need to know to use the Feature Profiles feature. Fixing rendering of helper and block tag helper We had an issue in Orchard Core when using Tag Helpers in Liquid. You can write a tag like a block that will implicitly invoke ASP.NET Tag Helpers and try to map the provided name and properties to the given Tag Helper. In this case, we say to invoke the anchor Tag Helper and with the provided action, class, and route_todoid properties. Here you can see a nice example in the OrchardCore.Demo module to see how you can call an ASP.NET Tag Helper using Liquid. OpenID Recipes: use step model instead of the view model, support update Orchard Core got several updates related to the OpenID feature. The changes in this addition are: Add unit tests for OpenID scopes. Add unit tests for OpenID apps. Replace OpenIdScopeStepViewModel with OpenIdScopeStepModel in recipe. Replace CreateOpenIdApplicationViewModel with OpenIdApplicationStepModel in recipe. Adjust OpenIdScopeStep to support update. Adjust OpenIdApplicationStep to support update. Adjust OpenIdApplicationStep to include importing scopes, which were not imported before. If you check out the code of the OpenIdApplicationStep, (which is a recipe step that adds an OpenID Connect app), you will see that now it's using a new OpenIdApplicationStepModel instead of the CreateOpenIdApplicationViewModel to serialize the data coming from a recipe file. Refactor IQueryResult usage This addition contains several changes: Moving LuceneQueryResults to OrchardCore.Lucene.Abstractions. Moving SqlQueryResult to OrchardCore.Data.Abstractions. Adding OrchardCore.Queries.Abstractions to both these projects to use the IQueryResults interface. This means now, if you would like to use the LuceneQueryResults in your solution, you will find that class in the OrchardCore.Lucene.Abstractions project, under the OrchardCore.Lucene namespace. The old LuceneQueryResults class is marked as obsolete to do not break your code when you will update your solution to the upcoming Orchard Core 1.1. Demos Bynder for Orchard Core This demo is about an Orchard Core module for integrating with the digital asset management platform Bynder. Foremost, it provides the Bynder Field content field that can be added to content parts so Bynder resources can be browsed and attached. But what is Bynder? Bynder’s digital asset management platform enables teams to collaborate in the cloud, get content to market faster, and maximize the impact of marketing assets. It's pretty much a media gallery for bigger companies or for governments used mostly by marketing people. You can upload images and else into Bynder and then everybody from marking will access and use them when publishing materials. If you are interested, you can easily create your 30-day trial here. This module adds a media picker field for Bynder into the Orchard admin. Let's see it in action! In this demo, we will go with a quicker way and use our Open-Source Orchard Core Extensions full Orchard Core solution. We just clone the repository of the Bynder module too and add it to this solution. You have to do one thing before using the module. You need to configure your Bynder Portal's URL to be used in all Bynder Fields via the BynderOptions see its definition. It means that you need to add the PortalUrl to the appsettings.json file. Now, let's set up a site using the Blog recipe. After, we need to enable the module. To do that, head to Configuration -> Features and find the one called CSM.Bynder. Let's say that we want to extend the content definition of the Blog Post by adding the Bynder Field to it (Content -> Content Definition -> Content Types -> Blog Post -> Add Field). Now we have the Bynder Field added to the Blog Post content type, let's see what will happen if we would like to edit the predefined blog post! You will find a new button called Browse Bynder. And if you click on that button, you have the ability to browse some images. Here you can see the dialog provided by the Bynder SDK where you can see all of the assets under the specific collection of the given company. The field is currently configured for allowing multiple of these pictures so we will be able to select more than one. And that's not all of it! If you would like to know more about this module developed by Lombiq Technologies, just head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 229 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!

JSON Recipe Deployment Step, Tenant Feature Profiles - This week in Orchard (14/10/2021)

A new extension method to encode redirect URLs, documentation for the image Shortcode, a new JSON Recipe deployment step, and a nice demo about the Tenant Feature Profiles feature! Don't forget to check out our current post to know more! Orchard Core updates JSON Recipe Deployment Step The only way before being able to execute a custom JSON recipe step was to create a file with the recipe inside and execute the recipe. Now it's much easier, you can just paste JSON, and then you have the Monaco IntelliSense inside the editor. To try this out, set up your site using any recipe and make sure you have the Deployment feature enabled (Configuration -> Features). Now head to Configuration -> Import/Export -> Deployment Plans and add a new deployment plan. Hit the Add Step button to add a new step to it and find the one called JSON Recipe that exports a JSON Recipe. Here we would like to disable the OrchardCore.Templates feature when someone imports this deployment package. If you execute your deployment plan, you will see that the recipe contains one step with the JSON content that we have just provided in the JSON Recipe deployment plan. Document Encode redirect URLs If you publish a content item (a blog post for example) with a permalink that contains non-English characters, the redirect goes to a URL where the non-English characters are encoded. Like /Admin/Contents/ContentItems/Ελληνας-ϰαὶ-δὴ-ϰαὶ-γράμματα and of course we are getting a page not found message. The fix was for that to encode the redirect URLs. It has been merged but after a while, it had to be changed because the EscapeUriString method has been deprecated in .NET 6. and it was not building anymore. It was removed because it was not used correctly by users, and it was apparently buggy. The solution is there is a new custom method in Orchard Core called EscapeLocationHeader because it's a custom escape for the location headers. It's using GetComponents with custom parameters to do that. The idea is that anytime you do a redirect, the server will not accept custom characters because it contains non escaped characters, and it needs to be escaped. But not all of them need to be escaped, just the query strings, the parts that are not like slashes and equals. So, if you are using the this.LocalRedirect(returnUrl, true) or the this.Redirect(returnUrl, true) extension methods, it will use the EscapeLocationHeader method to correctly escape the URL. Demos Tenant Feature Profiles We had a demo a few weeks ago about a feature that is about through app settings/configuration adds the ability to restrict the features and/or themes that are available to either a tenant and/or all tenants or a mix of both. This time we will see the final, merged version of this feature that you can check out any time if you clone the main branch of Orchard Core! First of all, set up your site and enable the Tenants and the Tenant Feature Profiles features, which provides a way to manage available features for each tenant. Now head to the new option under Configuration called Tenant Feature Profiles where you can add feature profiles. Here you can set the rules that you want to use. By default, you can have an Include and an Exclude rule. By using these you can easily say that I don't want to allow the given feature for the assigned tenants or I want to allow my custom feature to the given tenants. The Expression contains the name of the feature but it can include stars like OrchardCore.*Templates that will match the OrchardCore.Templates, OrchardCore.AdminTemplates and OrchardCore.ShortCodes.Templates feature as well. Let's say that we don't want to allow the TheAgencyTheme and the features with names to start with OrchardCore. and end with .Templates. Now let's create a tenant with these rules. To do that, navigate to Configuration -> Tenants and hit the Add Tenant button. The first thing that you may notice here is the new Feature Profile dropdown where you can optionally specify which feature profile should be applied to this tenant (as you can read the hint). We have one, called restricted profile, let's select that one. And it's time to set up our tenant to see what are the available features there. If you search for the text templates, you will see that the search returned no results. If you navigate to Design -> Themes and try to find the TheAgency theme, you will see that the theme is not there in the list. Note that the Tenant Feature Profiles feature is only available for the default tenant naturally. And that's not all of that! If you would like to see more, don't forget to check out this recording on YouTube! News from the community .NET Community Standup - What's new in Orchard Core The .NET Community Standups are weekly live shows, hosted by the .NET team, are casual sessions full of community content, demos, Q&A, and discussions around what's happening in .NET. Last week you could see Sébastien Ros showing you the latest improvements and features of Orchard Core. If you are new to Orchard Core or you if are a developer who hasn't worked with Orchard Core in a long time or just wants to see a nice overview about what Orchard Core can provides you with version 1.0, head to YouTube now for the recording! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 228 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!

URI components Liquid accessors, Lombiq JSON Editor - This week in Orchard (15/09/2021)

Add Cc and Bcc to Workflow Email Task, URI components Liquid accessors, Lombiq JSON editor, and many more coming this week! Do you want to know more? Then it's time to check out our current post! Orchard Core updates Add Cc and Bcc to Workflow Email Task If you would like to send an email using Workflows, you can use the Email Task to achieve your goal. Simply navigate to the admin UI of Orchard Core and go to Workflows (don't forget to enable the Workflows and the Email features) to create a new workflow. If you add a new Email Task to your workflow, you will see that this task has now two new fields: the Cc and the Bcc. RegisterUserTask: Subject & Template for confirmation email should not be required if Send Email is unchecked And while we are talking about the workflows, let's check out another workflow task, the Register User Task which registers users from form fields. When adding this task to your workflow, you can easily say that I want to send a confirmation email to the newly registered user with this subject and template. The issue was that the subject and the template for the confirmation email were required even if Send Confirmation Email is not checked. URI components Liquid accessors By default, the Liquid templates have access to a common set of objects. You can easily access the properties of the content item that is currently being rendered, the authenticated user for the current request, the current site settings, and the current request itself of course. Check out this page of the Orchard Core documentation to see all of the available properties on the Request object. If you use the Request object quite often, you will notice that this table now has new properties, like the QueryString, UriQueryString, Path, UriPath, PathBase, UriPathBase, Host, and UriHost. Generate Rule Condition TargetUrl in a correct location The rules module was designed with extensibility in mind; however, there is one line that is in the view for it, setting the TargetUrl property of the modal picker to the layers controller. It needs to be moved out of the view, and into the Layers controller so that the view can be used by other modules, pointing to different controllers. Demos Lombiq JSON Editor The Lombiq JSON Editor is our Orchard Core module for displaying a JSON Editor like on jsoneditoronline.org. You can easily clone or download the module from this GitHub repository. If you want to quickly try out this project and see it in action, check it out in our Open-Source Orchard Core Extensions full Orchard Core solution and also see our other useful Orchard Core-related open-source projects! In this demo, we will go with the quicker way and use our Open-Source Orchard Core Extensions full Orchard Core solution. If you clone that repository and set up your site using any setup recipe, let's just navigate to the admin UI of Orchard Core, and under Configuration -> Recipes, you will find one called Lombiq Open Source Orchard Core Extensions - JSON Editor Sample that is about demoing the Lombiq JSON Editor module. Let's run the recipe! Now let's see the list of the content items where you will find a new one called JSON Example Page. This page has a JSON Field which comes from the Lombiq JSON Editor module. It's using a tree editor by default that you can use to manipulate the content of the JSON inside. But of course, you can have other types of editor for your JSON if you want, like you can have a code editor with numbered lines with syntax highlighting or you can just use a pure text editor and so on. Using a simple json-editor tag helper you can easily render the JSON editor. You can pass a string value to the editor that will contain the JSON itself, pass the JsonEditorOptions class that contains several configuration values like EscapeUnicode, SortObjectKeys, and so on. And you have several other options and use-cases for this JSON field. The JSON Example Page, which comes from the recipe, has a Liquid Part too that reads the values from the JSON field and prints the values in a simple list by using Liquid and JavaScript. Here is the display view of the JSON Example Page. If you would like to know more about this new field, head to YouTube for a recording! News from the community New GraphQL 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. You can use this module as part of a vanilla Orchard Core source that includes the full source code - which is the recommended way. You can also use it as part of a solution that uses Orchard Core NuGet packages; however, it's harder to look under the hood of Orchard Core features. And the module just got a new little GraphQL sample! Check it out if you would like to know more about Orchard Core's GraphQL module and learn how to extend the Orchard GraphQL APIs! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 226 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!

Include or exclude tenant features and/or themes, allow editing Time Field seconds and milliseconds - This week in Orchard (07/09/2021)

Allow to edit Time Field seconds and milliseconds, document dependency version selection in ResourceManagementOptionsConfiguration class, demo about a feature to include or exclude tenant features and/or themes, and many more coming this week! Check out our post for more! Orchard Core updates Document dependency version selection in ResourceManagementOptionsConfiguration class Let's say that in the theme layout, you want to enforce Bootstrap 4.6 and added this <script asp-name="bootstrap" version="4" at="Foot"></script> which includes Bootstrap 4 as desired. Now let's have a custom module that allows converting a select-menu to a searchable-menu. This module depends on Bootstrap and jQuery to be able to function. So in the ResourceManagementOptionsConfiguration class, we need to define the dependencies like this: _manifest.DefineScript("SearchableDropdown") .SetUrl("~/SearchableDropdowns/bootstrap-select.min.js", "~/SearchableDropdowns/bootstrap-select.js") .SetDependencies("jquery", "bootstrap") .SetVersion("1.0.0"); _manifest.DefineStyle("SearchableDropdown") .SetUrl("~/SearchableDropdowns/bootstrap-select.min.css", "~/SearchableDropdowns/bootstrap-select.css") .SetDependencies("bootstrap") .SetVersion("1.0.0"); Unfortunately, the SetDependencies("bootstrap") call here forces to include Bootstrap 5, which will cause Bootstrap 4 and 5 to be included! Obviously, this is a problem. But you can easily solve this problem. You can use the SetDependencies method to ensure the script or style is loaded after their dependency, where you can set a specific version of your choice or the latest version available. Check out this new section in the Orchard Core documentation where we used SetDependencies("bootstrap:4") to say that we would like to define a style that depends on Bootstrap version 4. Allow editing Time Field seconds and milliseconds Let's take a quick look at the improvements of the Time Field. In our example, we have set up our Orchard Core site using the Blog recipe and modified the content definition of the Blog Post content type by adding a new Time Field to it. When you navigate to the settings of the Time Field, you will see a new setting here, called Step. This is just about manipulating the value of the step attribute of the time input type. You can read a lot about the step attribute here, now we just want to show you a small example of how you can use this new option. Let's say we want to allow to be able to edit the seconds for the Time Field too, but not the milliseconds. If we type 15 for the Step here, users can choose from the following values when setting the seconds: 0, 15, 30, and 45. It means, setting the value of this field to 03:39:15 PM would be suitable. If the user would like to create a new blog post and enter an invalid value for the Time Field, they would see the following message by showing some suggestions about the nearest valid values. Do not enable OrchardCore.Feeds by default in standard recipes By default by enabling the OrcardCore.Feeds module your lists will have feeds capabilities but for the Blank and the Agency recipe. This doesn't make any sense because we don't have any lists defined by default in these recipes. The change here is the Blank and the Agency recipes now will not enable the Feeds module by default. Demos Include or exclude tenant features and/or themes This upcoming feature is about through app settings/configuration adds the ability to restrict the features and/or themes that are available to either a tenant and/or all tenants or a mix of both. If you checkout to the deanmarcussen/excludefeatures branch, you will see a new OrchardCore_Features section in the appsettings.json file where you can see rules that you can apply to the various features. The idea here is that you can have the rule to either exclude or include a given expression based on the feature name. By default, the OrchardCore.Templates feature and the TheAgencyTheme are excluded for all tenants, but the default tenant has an include rule with a "*" expression which means that tenant gets everything. Now let's see this in practice! Let's set up a site using the Software as a Service recipe to get the Tenants feature enabled by default. If you navigate to Configuration -> Features on the admin UI, you will see that the Templates feature is available with the TheAgencyTheme as well (Design -> Themes). But if you have a tenant called blog1 and search for templates on the Features page, you will only find the Shortcode Templates one because the Templates feature is excluded for this tenant. And the same will apply if you navigate to Design -> Themes and try to find The Agency Theme. A nice additional feature would be to have a UI, where you can specify what kind of features and/or themes would like to exclude or include for the given tenant. But we are just scratching the surface of this upcoming feature. If you would like to know more, don't forget to head to YouTube for a recording to learn more! News from the community Helping the City of Santa Monica with Orchard Core consulting A few weeks ago we mentioned a new website using Orchard Core: the site of the City of Santa Monica, which you can find on Show Orchard as well! 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. Santa Monica is a beachside city of 8.3 square miles on the westside of Los Angeles County. Offering an environment of unparalleled natural beauty, the city is home to a mix of residential communities, commercial districts, and recreational venues. And we actually had a small part in this by helping the creation of this site with some Orchard Core consulting. If you would like to know more, check out the case study on our site here. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 224 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!

Implementing Zone shape alternates, Lombiq UIKit for Orchard Core - This week in Orchard (25/08/2021)

We can write about several nice improvements this week! Adding missing deployment steps, new strongly typed example with update endpoint in the documentation, implementing Zone shape alternates, and many more! Orchard Core updates Implementing Zone shape alternates This feature is about adding Zone shape alternates like in Orchard 1. The Zone__[ZoneName] template is called when displaying a Layout zone. Which zones are available depends on the current theme. And now you can find a new section in the documentation of Orchard Core about what are the available properties of the Zone shape and how to display the content of a given zone using Liquid and Razor. Allow file attachments for deployment steps Let's say you need to create a custom deployment step that accepts an Excel file as an input with data to use for creating a custom deployment step. But the form posted does not accept attached files. The issue was that the OrchardCore.Deployment/Views/Step/Edit.cshtml file has no enctype="multipart/form-data" attribute. Expanded strongly typed example with update endpoint The Content Types page of the Orchard Core documentation is about showing you how to use migrations to create your new content type, how to change the metadata of your content type, or how to add content parts or content fields to your type. Now there is a new sample that shows how to update your strongly typed content item using an API in this case. The UpdateProductPriceAsync is just about getting the Product content item by an Id and updating the value of the Price Numeric Field of it, which can be found on the ProductPart. Add site settings deployment for Content Audit Trail Settings and Google features When you navigate to Configuration -> Features and enable the Audit Trail module, you will have a feature that provides a log for recording and viewing back-end changes. If you navigate to Configuration -> Settings -> Audit Trail and click on the Content tab, you will see a list that contains all of the content types of your installation. Here you can select the types of content whose events are recorded. And now you can export these settings using a deployment plan! To do that, just create a new deployment plan (Configuration -> Import/Export -> Deployment Plans) and add a new deployment step to it. You just need to find the Content Audit Trail settings one that exports the content audit trail settings. If you execute your deployment plan, you will see that the recipe file contains the list of the allowed content types. And the same goes for the Google Analytics and Google Tag Manager modules. If you enable those, you will find some settings under the same Configuration -> Settings option called Google Analytics and Google Tag Manager. Now you just need to add the Google Analytics Settings and Google Tag Manager Settings deployment steps to your plan, and after you execute that, you will get the following recipe file. Demos Lombiq UIKit for Orchard Core The Lombiq UIKit for Orchard Core module contains reusable shapes like text editors, custom-style checkboxes, dropdown editors, and in the future potentially more complex editors. Add the module to your solution and enable the Lombiq UI Kit - Showcase page feature if you want to check out the currently available shapes. You can see them under ~/UIKitShowcase after the feature is enabled. The example code for using these shapes can be seen in Views/Showcase/Showcase.cshtml. This module contains only those stylings which are needed for these shapes to work. During one of our client projects, we needed to standardize UI elements both on the front end and the admin area. Like text fields, drop-downs, and so on. Once you go beyond the very basics with styling and functionality this comes a bit more complex. Centralizing things is a good option in this case, and while we are doing that let's have an open-source module about it. And we have already added this module to our Open-Source Orchard Core Extensions solution! The only thing you need to do is to clone this repository and set up your Orchard Core site with any recipe you want. After head to the admin UI of Orchard Core and enable the Lombiq UI Kit - Showcase page and Lombiq UI Kit modules. Now you just need to navigate to the https://localhost:44335/UIKitShowcase URL, which showcases all the elements that are built-in into the module. But how can you use these? Especially they are just simple tag helpers. If you open the mentioned Showcase.cshtml in the Lombiq.UIKit module, you will see the content of the showcase page. Here you can see we have the editor tag helper that accepts several properties like the type, labelPosition, iconClasses, placeholder, and so on. By just providing these you can have nice, standardized UI elements that can be also used in Liquid as well. If you would like to know more about this feature don't forget to check out this recording on YouTube! News from the community DotNest Core DotNest Core is a complete redevelopment of the DotNest platform, all on the latest version of Orchard Core. We've been running it with a couple of select few customers for a while now, and it's time to open it up a bit more. While you can't yet simply create an Orchard Core-based DotNest site, you can sign up for our limited beta here. You'll soon be able to get a fully functional, reliably hosted Orchard Core site on DotNest where you can build your personal website or something to showcase your Orchard skills with. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 219 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!

Extension method for site setting deployments, optimize AddTokenToPath - This week in Orchard (11/08/2021)

The development of Orchard Core of course has been continued after the release of 1.0. Are you curious about the newest improvements of Orchard Core? Well, let's check them out! Orchard Core updates Optimize AddTokenToPath The community tries to make Orchard Core as optimized and as fast as it could be. C# and ASP.NET Core with other third-party libraries offer several tricks and techniques to achieve this goal. For example, you can use ZString instead of StringBuilder. ZString is a library that provides StringBuilder and StringWriter with zero allocation, meaning it's allocating an array on the stack for small buffers, instead of creating new StringBuilders and StringWriters every time. All ZString methods only allocate the final string. Also, ZString has enabled to access the inner buffer, so if the output target has stringless API, you can achieve completely zero allocation. Or another improvement could be to not use string.Split that causing array allocation, use sub-strings instead. Add extension method for site setting deployments Whenever you would like to add a deployment step that allows exporting your custom site settings, you need to register three services with the transient, scoped, and singleton lifetimes. It's not a huge issue though because you can easily open a Startup.cs file of a module that contains these kinds of registrations and see how you can do it in your module but having an extension method for site setting deployments could reduce the lines that you need to copy every time. The new AddSiteSettingsPropertyDeploymentStep allows you to register your custom site settings deployments just in one line! Check out the Startup.cs files of any module to see the new way of registering your site setting deployments. Not use a current culture when checking invalid Autoroute path If you enable the Localization module and set a default culture to a non en-US culture, e.g. th-TH, you will get a validation error when trying to save a content item with an Autoroute part. Here is the screenshot when trying to save a content item and a default culture is th-TH. This issue is from AutoroutePartExtensions.ValidatePathFieldValue method. Inside the method, there is a call of autoroute.Path?.IndexOf("//") which returns 0 instead of -1 when a current culture is th-TH. According to the MS document, IndexOf(String) searches a word by using culture and case sensitivity. Refer to Recommendations for string usage, we should use StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase for the non-linguistic string search. There is no case in a space and //, so the fix here was to pick StringComparison.Ordinal and to match IndexOf which is case-sensitive. Cypress 8.2.0 and Trumbowyg 2.25.1 If you are a huge Orchard Core enthusiast and like to check out the recent changes of the CMS from time to time, you may notice that the community upgrades the different .NET/Client-side/Test libraries from time to time. The Orchard Core documentation has a Libraries page under the Resources one where you can see the versions of these libraries that are used across the main branch of Orchard Core. Antoine Griffard recently updated Cypress to 8.2.0 and Trumbowyg to 2.25.1! With these updates, you can make sure that if you would like to use the built-in libraries of Orchard Core you will always have the latest versions! News from the community Lombiq Technologies: new developer colleagues and new group photo We had a great company trip last week where almost all of the colleagues of Lombiq gathered together to spend the whole day together offline. This was a great opportunity to update our group photo on our official website, so head to the About us page where you can see the most, but not all of our team as of the summer of 2021. And we also have two new colleagues to introduce: Ádám Jakab and Szabolcs Deme. Don't forget to check out their bio too! DotNest Core DotNest Core is a complete redevelopment of the DotNest platform, all on the latest version of Orchard Core. We've been running it with a couple of select few customers for a while now, and it's time to open it up a bit more. While you can't yet just simply create an Orchard Core-based DotNest site, you can sign up for our limited beta here. You'll soon be able to get a fully functional, reliably hosted Orchard Core site on DotNest where you can build your personal website or something to showcase your Orchard skills with. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 215 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!

Orchard Core 1.0 release - This week in Orchard (27/07/2021)

We are thrilled to announce that Orchard Core 1.0 is now available! Check out this post to know everything about the latest release of Orchard Core. In the upcoming weeks, we will check out the newest features and additions of Orchard Core 1.0. Let's get started! Orchard Core updates Turn The Default Theme LoginMenu into a shape for easier overriding It was a partial view. While you can override this from a child theme, you can't override it from admin-edited Templates. So this is about changing it into a shape. Now the LoginMenu shape it's in the TheTheme theme, and it can be easily customized. Added more clarity about how migrations work When you are new to Orchard Core, you may be struggling with the concept of migrations while developing a module for the first time. That information on this very important topic is scattered, so brunoAltinet decided to propose a separate section for data migrations. Now you will find a new page on the Orchard Core documentation about: what are data migrations, how to add migrations to your custom module, and you will also find an example that showcases three different data migrations (recipe migration, creating a map index, creating content type and updating content type). Fix Connection String input styles When you set up a site or a tenant in Orchard Core, the first thing you will see is the Setup screen. The Setup screen contains a few questions that you need to answer to configure your site. And the connection string is one of them. We used the input-group-append class here but we should not be using a form-select and input-group-append, because that is deprecated in Bootstrap 5. Add signal_url description Many activities have settings that can contain either JavaScript or Liquid syntax. These types of fields allow you to enter Liquid markup, enabling access to system-wide variables and filters as well as variables from the workflow execution context. We have a table of the JavaScript functions that are available by default to any activity that supports scripts expressions. The signalUrl function was missing from this table, but now you can find that here too! News from the community Orchard Core 1.0 Orchard Core 1.0 is released! If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the first released version of Orchard Core! The Releases page of the documentation is also updated that now contains version 1.0 with some breaking changes and the new features. Upgrade your solution to 1.0 now! Feel free to drop on the dedicated Gitter chat and ask questions! A new website using Orchard Core: Wings Over Water The Wings Over Water movie tells the story of the epic journeys of three amazing bird families – the Sandhill Crane, the Yellow Warbler, and the Mallard Duck – with extraordinary footage of their fascinating behaviors. Check out this brand new, amazing-looking Orchard Core site here! 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. Lombiq's Open-Source Orchard Core Extensions now with Orchard Core 1.0 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 now! 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. And we have also updated the solution to use Orchard Core 1.0! And what are these modules? Well, you will find a nice Readme.MD file for all of them. And if you like to use code snippets, you will love that our super-useful Visual Studio code snippets of the Orchard Dojo Library are now updated to Orchard Core v1.0! Check them out here! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 208 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!

Scheduling application, new branding assets - This week in Orchard (06/07/2021)

The new branding assets for Orchard Core are here! Check out our current post for a demo about a scheduling application, for the Auto Setup updates, and many more! Orchard Core updates New branding assets The issue was that we didn't really have concise branding guidelines or even proper branding assets. But the time has come, Orchard Core has now new branding assets! If you open up the Orchard Core Documentation, you will see the new icons and the new colors everywhere. If you click on the Resources option from the menu and select Branding from the left, you will find the updated guidelines and graphic assets for Orchard Core's branding. If you open up the admin UI of your site, you will see the new logo there too. When referring to Orchard Core, please use one of the logo variations without altering anything apart from the resolution (so don't change the colors, aspect ratio, graphics, or anything else). Bootstrap 5 for the front-end themes Orchard Core comes with some built-in front-end themes that you can use for your site. You can use a theme adapted for agency websites, a theme adapted for blogs, a landing page for a project that is under construction, and of course, the default Theme. When you use the latest preview source of Orchard Core you will notice that all of these now using Bootstrap 5, which means if you would like to use or customize them, you have the options to use the features that come from Bootstrap 5! Here is the content of the package.json file of the Blog theme. Add DistributedLock for Multi-instance AutoSetup It can happen that you have multiple deployments of Orchard Core, but you share the same database or the same Redis instance. Now you can see a new section in the documentation that explains how you can use the new optional distributed lock parameters like the LockTimeout or the LockExpiration. These help you to set the timeout in milliseconds to acquire a distributed auto-setup lock and the expiration in milliseconds of the distributed setup lock. Check implied permissions PermissionHandler should check ImpliedBy permissions. RolesPermissionsHandler doesn't have to check all user roles permissions, just Anonymous and Authenticated if applicable. RolesPermissionsHandler is scoped, so we can cache Anonymous and Authenticated permissions and not query them for each permission evaluation. Check out the default implementation of the IPermissionGrantingService interface, which evaluates if the specified PermissionRequirement is granted by provided claims. Demos Scheduling application The StatCan Orchard Core repository houses a collection of custom Orchard Core resources, modules, and themes that support various web applications and software-as-a-service (SaaS) products. Built on top of Orchard Core CMS, developers have a suite of web application features out of the box (e.g., content management, authentication, forms, themes, etc.) by customizing the selection and configuration of components. The extensibility of the framework allows new features and components to be added easily. One of the custom modules called StatCan Scheduling provides types and utilities useful for scheduling appointments. Let's see that module in action! First of all, let's run the solution and set up your site using the Vuetify platform theme recipe. The scheduling application and the Vuetify platform theme recipe are heavily built on the VueForms module that you can also find in this repository. If you haven't heard about it yet, you can open up This week in Orchard post from last year, where you can find a demo about this module. The first thing that you will see is a calendar that you can use to add appointments to it. You can add a bunch of other calendars and employees to the system. Employees can be used to say that I would like to add an appointment to this calendar for this employee. To be able to add an appointment, first, you need to add an employee to the system. It can be done using the admin UI of Orchard Core (Content -> Content Items -> New Employee). Let's say we would like to add an employee, and we assign this employee to the Default calendar. If you would like to add more than one calendar, you will find a taxonomy named Calendars. This has an AppointmentCalendar term content type. If you add a new AppointmentCalendar, you can specify its color, which will mean if you add a new appointment to this calendar, the color of the appointment will be used from here. But without further ado, let's see the front-end if you add an appointment to this calendar using our newly created employee. As you can see, we have one appointment on July 6 for the employee Gábor Domonkos. The list of employees can be seen on the right, which contains only one employee right now. You have the option to edit the given appointment or employee just by clicking on the given appointment. As we mentioned, this application is heavily built on the VueForms module that means if you navigate to Content -> Vue Forms, you will see a Vue Form content item called Create appointment, which is the component that is responsible for handling the appointment creation logic. And we are just scratching the surface of this application here. If you would like to know more about it, head to YouTube now to see it in action! News from the community Lombiq Helpful Extensions: Helpful Content Types and Widgets The Lombiq Helpful Extensions module is an Orchard Core module containing some handy extensions (e.g., filters for Projector). This time we will see the Helpful Widgets and Helpful Content types features. The Helpful Widgets adds multiple helpful widget content types. These are basic widgets that are added by built-in Orchard Core recipes though in the case of using a custom setup recipe these can be added by this feature too. Includes: ContainerWidget: Works as a container for further widgets. It has a FlowPart attached to it so it can contain additional widgets as well. HtmlWidget: Adds HTML editing and displaying capabilities using a WYSIWYG editor. LiquidWidget: Adds Liquid code editing and rendering capabilities. The Helpful Content Types includes basic content types that are added by built-in Orchard Core recipes though in case of using a custom setup recipe these can be added by this feature too. Includes: Page: Highly customizable page content type with FlowPart and AutoroutePart. The only thing you have to do is to navigate to Configuration -> Features on the admin UI and enable the Helpful Content Types - Lombiq Helpful Extensions and Helpful Widgets - Lombiq Helpful Extensions modules. And as may you guess, if you would like to add a new widget in your zone, you will see the three mentioned widgets without the need of running the given recipes that contain the definition of those widgets. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 207 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!