Add UI for email proxy settings, Lombiq Orchard Visual Studio Extension supports Visual Studio 2022 - This week in Orchard (31/03/2022)

Gábor Domonkos's avatar
Admin UI, Announcement, This week in Orchard

Fixing that content parts/fields were not showing up in preview when ContentCard is used, preventing Visual Studio Missing Components warning, adding UI for email proxy settings, and the Lombiq Orchard Visual Studio Extension now supports Visual Studio 2022! Check out our current post to read about the details!

Orchard Core updates

Add UI for email proxy settings

A few weeks ago, we mentioned that from now you have the option to configure the proxy server and the proxy port number if you would like to set up the SMTP settings. And you must configure ProxyHost and ProxyPort if the SMTP server runs through a proxy server. But you don't have a UI for these until now! If you enable the Email feature and navigate to Configuration -> Settings -> Email, you will find the text boxes that you can use to set up the proxy hostname and proxy port number.

UI for email proxy settings

Prevent Visual Studio Missing Components warning

If you have installed Visual Studio Community 2022 (and don't forget: Orchard Core 1.3.0 release is removing support for netcoreapp3.1 and net5.0. Only net6.0 is supported, which is not supported in Visual Studio 2019), you didn't need to install any additional components. So, maybe we could just remove the .vsconfig file. But maybe still useful to keep it, so Jean-Thierry Kéchichian removed the Microsoft.NetCore.ComponentGroup.Web.2.1, Microsoft.VisualStudio.Component.TypeScript.3.5, and Microsoft.VisualStudio.Workload.NetCoreTools components that aren't included in the Visual Studio Community component directory documentation or marked as no more supported.

Prevent Visual Studio Missing Components warning

Content parts/fields were not showing up in preview when ContentCard is used

Let's say, you are trying to modify the BagPart to support a read-only scenario. Like if a user does not have permission to EditContent but has permission to ViewContent. In that case, the user should not be able to edit but should be able to view the data.

Here are the steps to reproduce the behavior:

  1. Add content type A and attach BagPart to it that contains content type B. Make B securable to control who can edit and who can view it.
  2. Give the user read-only permission to B and Edit permission to A.
  3. At this point, you'll need to modify the BagPart.Edit.cshtml template to set the BuildEditor property to false when the user does not have the proper permission to edit.
  4. Finally, you'll need to render the ContentPreview shape on the ContentCard.Frame to display the ContentCard in a preview only.
  5. The expected behavior would be that the ContentCard to show up in the BagPart as it would in a preview screen. But it does not.

The display the content cards correctly, the fix was to do a little modification in the ContentCard.cshtml file.

Fixing ContentCard preview

News from the community

Lombiq Orchard Visual Studio Extension now supports Visual Studio 2022

Lombiq Orchard Visual Studio Extension is a Visual Studio extension with many features and templates frequently used by Lombiq developers. It contains Orchard-related (including Orchard Core) as well as generic goodies. It contains several useful features like:

  • Dependency Injector: When a class is opened in the editor, you can inject a dependency with this feature. Type the dependency name, hit Enter, and it will be injected.
  • Orchard Error Log Watcher: Watches the Orchard error log (or any other error log) and lights up an icon when a new entry was logged. And wait, there's more! This feature also supports BlinkStick USB LED sticks that can blink or light up when an error happens. Check out this video for a demo of the whole feature.

And from now, our Orchard Visual Studio Extension supports Visual Studio 2022! For more details, check out the Readme!

Lombiq Orchard Visual Studio Extension

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 244 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!

No Comments

Add a Comment