The 100th This week in Orchard is here! In this post you could see a great demo about the CodeMirror improvements, we mention the updated Send Email activity, the new sample in our Orchard Core Training demo module about how to do unit testing, and many more! Thanks for joining us for the 100th time!
Orchard Core updates
Add Reply-To Header to Workflow EmailTask activity
When you send an email to a subscriber and they click Reply, the reply message is typically sent to the email address listed in the From: header. A Reply-To address is identified by inserting the Reply-To header in your email. It is the email address that the reply message is sent when you want the reply to go to an email address that is different than the From: address.
If you want to configure the Reply-To header in your EmailTask activity now you can do it! Just add the Send Email task to your workflow and use the updated editor of the activity!
Allows ZoneShapes to be overridden
If you were trying to override the
ContentZone implementation in
ZoneShapes.cs to get some different behavior for some tabbed shapes, it won't work, because it was not attributed with
[Feature(Application.DefaultFeatureId)]. Just a note here: the
[Application.DefaultFeatureId] attribute is used to allow core shapes to be overridden.
CodeMirror in Orchard Core was a little bit outdated because it was not updated from quite a long time ago. All the views in Orchard Core have been changed that is using CodeMirror and now there is a new style called
codemirror that is registered in the
ResourceManifest.cs of the
OrchardCore.Resources module. And that's not all, here you can see several other add-ons that are included by default. Here you can see the content of the
But let's see in action what can you do with these add-ons! When you are using HTML, you will have auto-close for the tags. If your text is too long, it will wrap the lines and the currently active line is being highlighted. And these features are provided by the newly added CodeMirror plugins. In this GIF you can see a Text Field and an HTML Field. We set the editor option to Code Mirror for the Text Field and Standard for the HTML Field.
And as you could saw in the code above, you can turn on or off these features just by setting the values of the editor. If you don't want to have an auto-close tags feature, just simply say
If you want to know more about the CodeMirror improvements, don't forget to check this recording on YouTube!
News from the community
Unit Testing in the Lombiq Training Demo for Orchard Core
We added a new service and tests to it to learn a bit of unit testing! First, we'll create a service that we'll then later test in a test project. This service won't be used anywhere else, it's just an example to be tested. Why a service? Services are where usually most of the complex logic of an Orchard-based web app goes. You can test anything as long as you've written it in a testable way (by, for example, not utilizing hidden dependencies but injecting them all), you can write tests for controllers, drivers, background tasks, you name it. However, we think that unless you're aiming for 100% test coverage it's best to focus your unit and integration testing efforts on services. Then, the rest of the app can further automatically be tested via e.g. UI tests.
This week in Orchard for the 100th time!
We started our This week in Orchard series to inform our readers with the latest news and improvements around Orchard 1.x and Orchard Core. In this series we try to cover the most important features of the CMS and of course from time to time we are looking under the hood and show you the different code changes. But this series is not just for developers. We also want to target the super users of Orchard Core to know and be able to use every feature of it by learning the usage of the admin UI.
Last year we started to upload Orchard Core demos in separate videos from the weekly podcasts to be able to find the given feature that you are really interested in as quickly as possible. We have also created a playlist for it on YouTube that contains more than 30 videos for now!
And don't forget our Orchard Nuggets series that we have started in December last year! In that series, we answer common Orchard questions, be it about user-facing features or developer-level issues. Check out these posts for bite-sized Orchard tips and let us know if you'd have any questions!
We hope that you like our series and find it useful! Thanks for reading us!
4000 stars on GitHub
In GitHub, you can star repositories and topics to keep track of projects you find interesting and discover related content in your news feed. Starring a repository also shows appreciation to the repository maintainer for their work. Many of GitHub's repository rankings depend on the number of stars a repository has.
And we are proud to present that on June 22, the Orchard Core repository reached 4000 stars and it's still growing! Congratulations on the community!
Using the admin UI of Orchard Core - Orchard Core Workshop 3
Last Saturday we did a workshop with 11 attendees about how to use the admin UI of Orchard Core! This Saturday we are gonna show you how to develop a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage!
Orchard Dojo Newsletter
Now we have 151 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post published to Orchard Dojo, including This week in Orchard of course.
Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here!