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

Featured tags

IIS
API
SMS
All tags >

Secure Media feature, add a way to hide ContentTypeDefinitionSettings - This week in Orchard (19/04/2024)

Consolidate admin required fields, add a way to hide ContentTypeDefinitionSettings, and a demo about the brand-new Secure Media feature! Let's see the details! Orchard Core updates Consolidate admin required fields Content fields and some parts added to a content type can be set as required, but there is no visualization before submitting changes. The validation error messages for required fields have inconsistent text messages (some contain a dot at the end, some don't, some are using '' for value, and some have explicit value names in the text. Also, validation error messages are included in the validation summary only, and not under the required field, but for example, in TitlePart everything is correct. All error messages should be written in the same format and text, for example: Please add value for '{0}'. At least some CSS class should be added on all required field labels to be able to identify required fields in the content item form and required validation messages should be displayed under each validated field. As you can see in the screen below, the community consolidated the admin required fields by making the following steps: Add star char for all required fields. Add validation message for required input field like in TitlePart. Consolidated color for start and validation error messages. Consolidated error message texts. Removed client validation from inputs because of inconsistent form behavior dependent on the used browser, selected locale, etc. Add a way to hide ContentTypeDefinitionSettings The intention behind this change was to add a configuration to show/hide the creatable, listable, draftable, versionable, and securable flags. We have a new ContentTypeDefinitionDriverOptions class which contains boolean values that you can use to show or hide the creatable, listable, draftable, versionable, and securable options when editing the content definition of a content type on the admin UI. The ContentTypeDefinitionOptions class offers a method for configuring content type definitions to either display or conceal global settings from appearing on the UI. In certain cases, like when creating CustomSettings or CustomUserSettings, these options are useless. So, it would be nice to hide them instead since they do nothing. So, to quickly demonstrate this change, we enabled the Custom User Settings feature under Configuration -> Features. After, we navigated to Content -> Content Definition -> Content Types and created a new content type called UserProfile. We added some fields to it and set the stereotype to CustomUserSettings to be able to use this content type as a custom user setting. As you can see, only the Securable checkbox is here, we can't set the other content type definitions like creatable, listable, etc. And the reason for that is in the Startup.cs file of the OrchardCore.Users module, we set up the boolean values of the ContentTypeDefinitionDriverOptions class where the stereotype is CustomUserSettings. But we haven't touched the value of the ShowSecurable, so it can be kept its true value. Demos Secure Media feature This demo is about the brand-new Secure Media feature for additional control over who can access media files. The key features include: Restricted Access to Media Folders: A view permission is created for the root media folder and each first-level folder within the media root, allowing administrators to restrict access based on user roles. Enhanced Viewing Permissions: Introduces permissions to view one's own media files and/or those of others, expanding upon the existing ManageOwnMedia permission. Consistent Access Rules for Media and Content Items: Media attached to content items will adhere to the ViewContent permission of the respective content item. This alignment ensures consistent access rules between media and content items. Protection for Temporary Attached Media Files: Secures temporary attached media files in a manner similar to personal user files. Improved Management Permissions in Admin: Refines the manage media permissions to allow media management only when viewing permissions are also granted. This prevents users from managing media they cannot view. Additionally, the creation and deletion buttons in the admin interface are disabled for folders that are not accessible post-creation or for special folders like "_Users" and "mediafields". Handling Unauthorized Access: Introduces a middleware that returns a 404 NotFound response for unauthenticated access attempts to secured media files. This approach not only restricts access but also conceals the existence of the file. Configurable Cache-Control for Secured Files: Sets the Cache-Control header of secured files to no-store by default, preventing their caching. This setting is configurable to suit different needs. Bearer Token Authentication for API Access: Enables bearer token authentication for media files, aligning with Orchard Core's API capabilities. This feature is particularly useful for headless CMS scenarios and external application integrations. We will not do a deep dive here but will try to demonstrate some of the mentioned features. First of all, you need to enable the feature itself by heading to Configuration -> Features where you will find the Secure Media feature. After enabling it, let's add a new folder to the root of the media library under Content -> Media Library. We named it secure and placed a file into this library. Now, let's navigate to Security -> Roles, and find a section called Secure Media. By default, everyone can see everything, so nothing will change if you enable the feature. It's currently only using the root folder and the first folder level; this means you can only have one tier of secured media folder. And as you can see here, you can define who can view media content in our newly created folder, called secure. Now let's play a little bit with the permissions and say that Anonymous users and Editor users don't have permission to view media content inside the secure folder. To test this out, we created a new user with the Editor role and logged in with this user. Head to the admin UI of Orchard Core and open up the Media Library. As you can see, this user can't see the folder called secure and can't access the files inside the folder. As always, if you want to see more about this new feature, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 471 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, log file path based on orchard_app_data environment variable - This week in Orchard (12/04/2024)

Add cache busting parameter to media thumbnails and links in Media Library, the log file path now based on the orchard_app_data environment variable, and the latest news about this year's Orchard Harvest conference! Check out our post for the details! Orchard Core updates Add cache busting parameter to media thumbnails and links in Media Library It's recommended to send long far-future client cache TTLs in HTTP response headers for static resources like images, documents, and CSS files, and this is what Orchard Core also does. However, in the Media Library admin, this causes an issue if you change files since thumbnails and View links will now load the old files. This is especially a problem with CDNs, since then it's not just your browser caching these files but the CDN too, which for an ordinary user is impossible to purge, and thus they won't see the updated files. The solution here is to make Media Library admin thumbnails and View links use the usual cache-busting parameter mechanism. Log file path based on orchard_app_data environment variable As described in the document here, setting the environment variable orchard_app_data doesn't change the log location, and logs are still placed under the App_Data folder. So, if you created an environment variable orchard_app_data with value C:\\orchard_data, and ran the application with the Default tenant, you noticed that the Sites folder created at C:\\orchard_data but logs are generated under App_Data. But because the orchard_app_data environment variable has a value C:\\orchard_data, logs should also be created under C:\\orchard_data. The goal of this change was to fix this behavior. News from the community Orchard Harvest 2024 We had the first online Orchard Harvest last year, and it was so great to see that we had 188 sign-ups for the conference! It was an excellent opportunity to share knowledge, talk about development plans and ideas, and foremost, meet the rest of the worldwide community. And of course, we recorded every session, which means they are available on YouTube! Click the link to rewatch all the inspiring talks and discussions! So, after last year, the Orchard Harvest Conference will be held again in 2024. Last year it was held online due to economic reasons. This year the organizing team has decided to finally organize the Orchard Harvest 2024 Conference in person. Each year, we try to attract as many people as possible, and a face-to-face event helps to build truly productive relationships. Last year, we started organizing the event in Las Vegas, so that's one of the reasons we're going to do it here again this year! Also, most of the active people in the community are either from the US or can reach the US. According to the questionnaire, most people wanted the event to take place in September. With the organizers, we agreed that a Thursday and Friday would be best, so it wouldn't take so many working days away from people. They could even stay for the weekend on an individual basis. Finally, we chose the 12th and 13th of September. It's not right after the summer holidays, people don't travel as much then. There are fewer things that could come up for potential participants that would prevent them from participating. Also important is that it does not interfere with any national holiday. We are currently working with the organizers on a contract with the venue. We are also thinking about what themes the event should be based on. Furthermore, we are trying to put together a set of goals that we will try to follow through. Do you have any ideas that you would like us to consider? Please tell us under this GitHub Discussion! There is a possibility of sponsoring the Orchard Harvest conference, and we are currently in the planning stage. We would be open to it if you would like to sponsor our event. If you are interested, you can contact us using [email protected] or the [email protected] email addresses, and you can also write under the mentioned GitHub Discussion page. If you would like to be kept informed about the events around the conference sign up here to receive our announcements about Orchard Harvest. As we move forward, we will keep community members informed of the details, and you will also find every detail in this newsletter too! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 471 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!

Add a way to restart an instance of a workflow, Http Redirect to Form Location Task - This week in Orchard (17/11/2023)

Thumbnails for the media library, add a way to restart an instance of a workflow, and a demo about the Http Redirect to Form Location Task! Let's get started! Orchard Core updates Thumbnails for the media library In the media library, there are new icons and thumbnails for well-known file types using Font Awesome icons. Here, you can see the assets provided by the Blog recipe. When you are uploading a PDF or an XLXS file, you can see the new icons instead of the old ones. Add a way to restart an instance of a workflow Sometimes, a workflow instance can fail for some reason, for example, we have a workflow that sends an email and fails. It would be helpful if we could restart the instance. This change adds a button next to the Delete button named Restart. This takes the current workflow state and restarts it. As you can see here, we have a workflow called test with one faulted instance. If we hit the Restart button near the faulted instance, it creates another instance that can run successfully. To do that, there is a new RestartWorkflowAsync method in the IWorkflowManager interface, which starts a new workflow using the specified workflow definition. Each type of activity can implement custom logic when a workflow instance has been restarted because sometimes it needs to load some extra state. This can be achieved by implementing the OnWorkflowRestartingAsync and OnWorkflowRestartedAsync methods. For example, the ContentActivity now stores the content item version ID of the content item that triggered the workflow. It means when you retrigger a workflow, you can use the same version of the content item that you were dealing with before. Demos Http Redirect to Form Location Task This feature allows you to be able to put a form on a page and then somehow redirect back to that same page where we came from using a workflow. We already have a workflow task that allows us to redirect the user to a specific location, which is great if you know where you want to go back to. Like, if you want to go back to the home page, then you can always redirect the users to the home page. But what if you want to reuse the same workflow for multiple forms (or reuse the same form on multiple pages) and then when the user submits that form, go back to where they submitted the form from? There is no way to do that right now and that's where this demo came from. How can we redirect the user back to the page where they came from? Now let's create two forms, called the Q&A form and Contact Us, it doesn't matter right now. The thing that matters is they are both using the same URL to submit the form. So, we will have one workflow that will do something, then it will redirect the user back to the source form. Here, you can notice a new checkbox called Save Form Location. If we want to redirect the user back to this form, it's required to put a tick into this checkbox to store the location of the form. It's time to create our workflow! Here, you can see that the starting task of our workflow is an Http Request Event, followed by a simple Notify Task. The last task is a new one, called Http Redirect To Form Location Task. The last remaining thing to do is to set up our activities. As you can see, the Http Request Event has a new textbox with a label Form Location. It serves as a key that will be added as an entry to the dictionary of re-hydrated values provided to the initiator of the workflow, the Output of the WorkflowContext. Meaning we store the location of the source form under this key in the dictionary. As you can see, we need to use this key for the Http Redirect To Form Location Task as well. In a nutshell, the Http Request Event stores the source form's URL in a Dictionary with the provided QAContactUsFormLocation key, and the Http Redirect To Form Location Task will read the entry from the dictionary where the key is QAContactUsFormLocation. It allows us to store the location of the source form. And as always, if you would like to know more about this new feature, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 485 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!

Introduce a new Navbar shape, Stimata Hotel is using Orchard Core - This week in Orchard (10/11/2023)

Introducing a new Navbar shape, centrally defining media resources, and the brand-new Orchard Core site of Stimata Hotel! Let's get right into the news! Orchard Core updates Introduce a new Navbar shape In the Admin theme, multiple shapes were injected in the Navbar space. We had a zone, that was called NavbarTop, we were injecting the user menu, and then we were injecting a shape for the links. We were creating three shapes, and instead, we now have a Navbar shape, which you can utilize in the Admin theme, in the Theme, and in your own theme. It allows you to utilize drivers to be able to add line items inside that Navbar shape. That makes things more dynamic. Like injecting a theme toggler, the icon that navigates you to the front-end site, the culture picker, etc., can be done by using the driver. You can read more about it by visiting the docs, and the change logs of the upcoming Orchard Core version are also updated to tell you some more details about it, for example, how you can add the Navbar shape into your own front-end theme and back-end theme. Centrally define media resources This change is about centrally defining media resources to avoid scattered file references. The script and the CSS files needed for the Media-related fields and parts (Html Body Part, Html Field, Markdown Body Part) were always injected in a way where we defined the source and the dependencies of the required resources. By adding these resources to the ResourceDefinition, we can easily inject them just by using their name. News from the community A new website using Orchard Core: Stimata Hotel Stimata Hotel is nestled in Flampouria, a charming coastal nook on the western side of Kythnos, captivating with its sandy beach and the mesmerizing sunset over the deep blue sea. Check out their 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. Ryan Drew Burnett started it, but since he doesn't work with Orchard anymore, as announced earlier, it is now maintained by our team at Lombiq Technologies. Oh, and in case you haven't read our previous post yet, Show Orchard is now running on Orchard Core! Here's the case study about how we migrated it from Orchard 1! If you're considering migrating your Orchard 1 website to DotNest Core, this is an excellent time. Should you have any questions or encounter challenges, don't hesitate to reach out to us. We're always ready to bring our expertise to your unique project needs. Get in touch with us today, and let's start making your Orchard Core website even better! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 484 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 media file settings for allowed file types, Lombiq’s Journey with WTW’s Client Portal - This week in Orchard (29/09/2023)

Make UserMenu and LoginMenu extensible to using drivers, add media file settings for allowed file types, and a blog post about Lombiq’s Journey with WTW’s Client Portal! Let's see the details in our post! Orchard Core updates Make UserMenu and LoginMenu extensible to using drivers Currently, there is no easy way to extend or inject items in UserMenu and LoginMenu. This is because all items in there are hard coded. If you remember, a few weeks ago we talked about the User Display Name and the User Avatar features, and in the recording, Mike Alhayek showed how difficult it is to change the UserMenu or LoginMenu shapes. The suggestion was to make these shapes extensible. From now on, to inject new menu items in either the LoginMenu or UserMenu you can implement and register an implementation of DisplayDriver<UserMenu>. The Detail display type is used to create the front-end menu, whereas the DetailAdmin is used to create the admin menu. Here you can see screenshots from TheTheme theme and from TheAdmin theme. As you can see, every menu item has its own shape which makes extending the items of these menus way more flexible. Add media file settings for allowed file types Currently, when using Media Field, there is no way to restrict which file types can be used. Any extension that is uploaded can be selected. This works great for the most part. But what if you want to allow specific types? For example, creating a slide show of some sort. You should not be able to select non-image files for a slide show. Having a way to specify image extensions will help in this case. And here comes the new settings! Here, you can see that we have a content type called Slide Show Item. This content type has a Media Field attached, called Pictures. If you edit the Pictures Media field, you have a way to set the allowed media types (image types for our case) by using the image types checkbox which helps you to select all the file extensions with the "image" type. With the help of this friendly UI, you can easily say that you only allow users to upload images using the Pictures Media Field. Note the list of the extensions here comes from existing MediaOptions. News from the community Lombiq’s Journey with WTW’s Client Portal WTW is a multinational company providing services, such as insurance brokerage, risk management, and human resources consulting. Recently we implemented a specialized Orchard Core Client Portal for them. It was an exciting project, and we delivered it on time. While the final steps on the rest of the architecture are being completed, the whole portal is gradually being rolled out to users during the summer of 2023. If you are interested in the details, check out this case study for more! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 499 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!

Support more searchable file types in Elasticsearch, having a community manager - This week in Orchard (15/09/2023)

Add support for multiple media files in Elasticsearch and support more searchable file types in Elasticsearch! Let's see the details in our post and jump into a discussion about having a community manager! Orchard Core updates Add support for multiple media files in Elasticsearch We support searching PDF files in Elasticsearch. We do this by reading the text of the PDF file found in Media Field and saving the text from the PDF file into a custom index in Elasticsearch. This is great, because now anytime a user searches for a text found in the PDF file, we return the content items where the PDF belongs. The problem is that we only store the text of the first attached PDF file, not all of it. The solution is when trying to index a Text/String-based field, we should add all the values to the same index key. This will allow the content of multiple files to be indexed as expected. Support more searchable file types in Elasticsearch And while we are talking about improving Elasticsearch, here comes another goodie again by Mike Alhayek! Until this improvement, we only supported searching in PDF files in Elasticsearch, but we should be able to search .doc, .docx, .txt, .rtf, .ppt, .pptx. We can easily use Open XML SDK to add this support. The Open XML SDK provides tools for working with Office Word, Excel, and PowerPoint documents. If you navigate to Configuration -> Features, you will find a new feature called Media Indexing, which extends the media indexing capability to also encompass searching within files with the following extensions .txt, .md, .docx, and .pptx. If you check the files under the Indexing folder of the OrchardCore.Media library, you will find three new ones called PresentationDocumentMediaFileTextProvider, TextMediaFileTextProvider, and WordDocumentMediaFileTextProvider allowing you to index the content of the mentioned file types. News from the community Having a community manager The community had a discussion last week about having a community manager. There is no person in the Orchard world who would pretty much deal with marketing and design for Orchard, like doing that for a product. Things that a marketing manager or a product owner or something like that does for a paid product. Orchard Core is not like that but for open-source projects and communities, a community manager is the person who does such things. Get the word out, and evangelize Orchard, not just in word-of-mouth but in a systematic way. Make marketing in general and shepherd the project, so it follows the requirements and the needs of the community, and the manager responds to what happens in the world and does things that developers don't really like to do. Let's have this discussion in detail! Do you agree, do you have people you think would be suitable? What do you think about this? Chime into the following discussion and tell us your opinion! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 521 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!

Enhance the Search module and UI, System Module - This week in Orchard (24/03/2023)

Ensure the Background tasks name is visible for old entries, enhance the Search module and UI, and a demo about the System Module! Check out our post for the details! Orchard Core updates Ensure the Background tasks name is visible for old entries In a recent change to the background tasks, a title was added to the background tasks. This works great for entries that have not been saved into the database. However, for entries that are already saved in the database, we do not have a title to show so it leads to no name being displayed on the UI. Since the title is not an editable field, we should always set the title to the default settings when showing tasks on the UI. Enhance the Search module and UI Currently, we have two different SearchController. Each one handles its own search provider, Lucence and Elasticsearch. We should be able to combine these two into one and place it on the Search module since that module's sole purpose is to export a front-end UI for the search. Also, we should add a setting to change the placeholder for the search bar. Additionally, we should have a Search Form widget that would allow the user to add a search widget. So, this update contains the following enhancements: Remove the SearchController from both Elasticsearch and the Lucene module. We now have one common SearchController in the Search module. The new controller now returns a shape instead of a view model which allows the user to override the default views. Adds settings to allow the user to define a title for the search page and also a placeholder text for the search bar. Add a Search widget that a user can add to their site. The default widget will direct the user to the /search route. Allow the user to optionally pass the index name in the route value. For example, /search/index-name the index-name is an optional value, and when it is not provided, the default index is used. Let's see some of the improvements mentioned in action! For this demonstration, we set up our site using the Blog recipe, and to be able to test the enhanced Search module, we have to enable the Search module itself and one search provider, which will be Lucene, for example. Now, we need to create a Lucene index under Search -> Indexing -> Lucene Indices. Here we added the name BlogPosts and included the Blog Post content type to the index. After that, we navigated to Search -> Settings -> Lucene and selected the BlogPosts search index as the default index to use for the search page and put a tick into the "Allow Lucene queries in search form" checkbox. Now we have a simple search set up, let's see the new Search Widget in action! We decided to place this widget on the home page. The predefined Blog content item is the home page in this recipe, so we edited the content definition of the Blog content type by adding a Flow Part to it. By having a Flow Part, we can add the new Search Form widget to the Blog content item. Here we can add some placeholder text if we want and can define the index name. Now it's time to utilize our widget! If we navigate to the home page of our site, we will see our Search Form widget. Let's type something and hit the Search button. As you can see, it lists our test posts which contain the "post" word. And you may notice the index name in the URL too (BlogPosts). If we had multiple indices, we can replace the BlogPosts one with any other existing index and that would mean that we search for something based on the content of that index. Remove .tiff from the supported images array Most modern web browsers, including Google Chrome, Microsoft Edge, Mozilla Firefox, and Opera, do not support the display of TIFF images natively on web pages. This is because TIFF files are typically very large in size and may take a long time to load. If you check out the MediaOrchardHelperExtensions class, you will see that the .tiff is now missing from the _imageExtensions. Demos System 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 System Module, which provides information about the currently running application; it can display the available system updates and put your site in maintenance mode while you upgrade. 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 search for the "system" word. This will list the following features: System, System Maintenance, and System Updates. Enable them all! Now you will find a new option on the menu called System. Click on the Info under System! This page lists several useful information, like the ASP.NET Core Version, the OS Version, the Tenants, the enabled features, and so on. But you can find another option under System, called Updates. On this page, you can make sure that you are using the latest version of Orchard Core. If you are using the latest one (1.5 currently), you will see a "You're all up to date!" text, meaning there is no newer version of Orchard Core. And the third thing is the Maintenance mode. You can enable this mode by navigating to Configuration -> Settings -> System -> Maintenance and putting a tick into the "Allow maintenance mode" checkbox. If you do that and navigate to the front end of your site, you will see the page which shows you that the site is currently offline for maintenance. 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 430 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 Description to Content Types, Amazon S3 media options update - This week in Orchard (06/07/2022)

Adding Description to Content Types, Amazon Media Storage feature updates, and making media library upload size limit error message more detailed. Check out our current post to read about the details! Orchard Core updates Add Description to Content Types If you navigate to the admin UI of Orchard Core and head to Content -> Content Definition -> Content Parts and create or edit a Content Part, you have the option to optionally provide a description for the part. And Orchard Core displays this description on the page that lists Content Parts. And from now you can add descriptions to Content Types too! Amazon S3 media options update Neglectedvalue changed the custom AwsStorageOptions to AWSOptions provided by the AWS team. AWSOptions are more flexible and provide more ways to interact with AWS infrastructure: A huge piece of code(registration of the IAmazonS3 client) was removed and changed to a single call services.AddAWSService<IAmazonS3>(options); ClientFactory now allows using the common AWS credentials mechanism. Documentation was also updated. This change will also introduce many breaking changes: the OrchardCore_Media_AmazonS3 config section was changed: RegionEndpoint was renamed to Region and extracted from the Credentials section to the root section of OrchardCore_Media_AmazonS3, AccessKeyId was renamed to AccessKey, ProfileName was renamed to Profile. You will find these breaking changes in the documentation of the next Orchard Core release. Making media library upload size limit error messages more detailed It's not a bug, but rather an enhancement. When uploading to the media library a file larger than MaxFileSize, the error message isn't user-friendly, it just says 'Error: error'. You can quickly reproduce this by turning on the Media feature and uploading a file larger than MaxFileSize. From now on, the error message is more detailed, as you can see on the screen above. Thanks to Zoltán Máté from Lombiq for his first contribution! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 291 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 Orchard meeting!

Add WebP to Media Profile options, Sitemap DateTime format should be ISO 8601 compliant - This week in Orchard (24/06/2022)

Adding WebP to Media Profile Options, fixing that Sitemap DateTime format should be ISO 8601 compliant, and updating the Scripting docs to reflect the correct way to use IScriptingManager and IScriptingEngine! Check out our current post to read about the details! Orchard Core updates Add WebP to Media Profile options WebP is an image file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, as well as animation and alpha transparency. Google announced the WebP format in September 2010 and released the first version of its supporting library in April 2018. And from now you can select the WebP when adding a new Media Profile! To try that out, simply navigate to the admin UI of Orchard and find Configuration -> Media -> Media Profiles. Here you can add a new Media Profile or edit the existing ones. And the editor contains a dropdown where you can select the format for the processed image (a default value means a format command will not be applied). And from now, you can see that the list contains the WebP as well. Don't forget to check out the docs to know more about Media and Media Profiles! Sitemap DateTime format should be ISO 8601 compliant When formatting DateTime, sitemap source builders use the current culture instead of an invariant one. Here are the steps to reproduce the behavior: Change default culture to fi or fi-FI. Create a sitemap and add content to it. As a result, the formatted DateTime in the sitemap uses a period as a separator instead of a colon as you can see on the screen. Now, this has been fixed to use a colon as a separator instead of a period. Update the Scripting docs to reflect the correct way to use IScriptingManager and IScriptingEngine The scripting module provides an API allowing you to evaluate custom scripts in different languages. The example in the docs on how to evaluate code by executing some script using the IScriptingManager did not work. In the past, the example shows this way to get the current date using script. var scriptingManager = serviceProvider.GetService<IScriptingManager>();var date = scriptingManager.Evaluate("js: new Date().toISOString()"); However, the IScriptingManager does not expose a method that accepts string only. The goal here is to update the example to something like: var scriptingManager = serviceProvider.GetService<IScriptingManager>();var engine = scriptingManager.GetScriptingEngine("js");var scope = engine.CreateScope(_scriptingManager.GlobalMethodProviders.SelectMany(x => x.GetMethods()), serviceProvider, null, null);var date = engine.Evaluate("js: new Date().toISOString()"); If you open up the page from the docs about the Scripting module, you will find an updated example code that describes the correct way how to execute a script by using the IScriptingManager interface. News from the community Updated Lombiq's Open-Source Orchard Core Extensions Lombiq's Open-Source Orchard Core Extensions is an Orchard Core CMS Visual Studio solution. It contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries, like the Lombiq UI Testing Toolbox or the Training Demo module that guides you to become an Orchard Core developer. And from now, this solution with all the extensions inside is updated for Orchard Core 1.4.! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 287 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 Orchard meeting!