This week in Orchard - 03/01/2019

Gábor Domonkos's avatar
This week in Orchard

A new Metadata module, ways to allow theming for Login/Registration/ResetPassword screens, and adding configurable upload limits are the topics of this week. Check out our current post!

On Orchard Core

How to edit Orchard Core's documentation

Let's say you would like to edit a README.md file in the Orchard Core repository. If you want to add something, you just click edit in GitHub (the pen icon near the trash), and it will fork the repository, let's you edit in place the things. By clicking Preview changes, you will see the changes immediately. Then you can commit the changes right here, that will create a fork and a branch in your fork. If you do one change, then go to another file and edit it too, you can commit the changes to the same branch of your fork. When you are done you can create a pull request directly from the editor. You don't have to clone anything to edit the content, because we have a nice WYSIWYG editor here. It makes super easy to fix typos, add sections to documentation and so on.

Adding configurable upload limits

When we upload media items by default it' limited to 30 MB, because it's a hard limit in Kestrel and in IIS. This PR has a MediaSizeLimit attribute just for the Upload method. There is also a configuration, which is added to the Media module's configuration:

  • MaxRequestBodySize, which is the maximum payload of an upload action in bytes.
  • MaxFileSize, which is the maximum size of an uploaded file in bytes. Note you might still need to configure the limits in IIS. The default value is 30000000, if you want to accept bigger files, you can redefine it.

Allow theming for Login/Registration/ResetPassword screens

Right now if you want to customize the Login, Registration or the Reset Password screens, they have to be in the admin theme, because that theme is serving these screens right now. The reasons are that you may not have a front end and you still want to be able to log in. With this PR, you can customize these screens without having to create a custom admin theme. The solution is to create a custom filter called UsersThemeSelector, that will select the front end theme if you go any controller of the mentioned screens above. This way it will select the front end theme to render these pages. If you enable this feature, you will be able to use the views from your front end theme.

If you enable the User Registration and User Reset Password modules, you will have a Registration and a Reset password option under Configuration -> Settings (you will see a new Login option here too). If you click one of these options, you will see a checkbox, where you can enable the mentioned behavior. For example in the Registration, you will see the option to Use site theme for registration page.

Metadata module supporting base SEO tags, Open Graph, and Twitter tags

The Metadata module adds a part that you can set on the content type, so you can define all the SEO custom fields, like description, custom title, Open Graph, and Twitter. Let's add the Metadata part to the Blog Post content type! Then you can edit the Metadata part to what tags and keywords you would like to support.

Based on what you have enabled you will see the following screen when creating or editing a Blog Post.

Seth Cleaver, the author of this module made a great demo video about the Orchard Core Metadata Module.

If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

No Comments

Add a Comment