Bootstrap 5 in the default Admin theme, Orchard Core Commerce survey - This week in Orchard (27/05/2022)

Gábor Domonkos's avatar
Query, Documentation, This week in Orchard, Theme, Resource manifest

The default Admin theme now using Bootstrap 5, logging warning when a Zone isn't a Shape, adding documentation on Query API results changes and if you do e-commerce or if you have an opinion about e-commerce, please share your opinion with us by filling out this survey!

Orchard Core updates

Bootstrap 5 in the default Admin theme

The Admin theme now using Bootstrap 5! The change only affects the Admin theme, there is no change in the built-in themes, you can use whatever Bootstrap version would you like to use there (or any other framework of course).

If you open up the ResourceManagementOptionsConfiguration file in the Resources module, you can see that now you have the option to use the new Bootstrap version.

Adding Bootstrap 5 to Resources module

Log warning when a Zone isn't a Shape

You can't use both <zone> tag helpers and widgets for the same zone. If you have a widget in the zone, the content in zone tag helpers are ignored.

Steps to reproduce the behavior:

  1. Create a new Orchard Core CMS Web App solution.
  2. Add a new Orchard Core Theme project.
  3. Replace the Views/Layout.liquid with Views/Layout.cshtml having the following content to keep it simple:
    @inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
    @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
    @addTagHelper *, OrchardCore.DisplayManagement
    @addTagHelper *, OrchardCore.ResourceManagement

    <zone name="Footer">
        <p>Hello from zone tag helper!</p>
    </zone>

    @await RenderSectionAsync("Content", required: false)
    @await RenderSectionAsync("Footer", required: false)
  4. Launch and set up the web app.
  5. Go to /Admin/Themes, and select the newly created theme.
  6. Confirm "Hello from zone tag helper!" is visible on the home page.
  7. Create a zone "Footer" and a layer "Always" (boolean true condition).
  8. Create a widget content type with Html Body and add a new item with "Hello from Widget!" to the Footer zone.
  9. Go back to the home page. You only see Hello from Widget! and any tag helpers are ignored.

The expected behavior would be that you should see

Hello from zone tag helper!
Hello from Widget!

in the footer.

From now, the code will log a warning instead of failing silently if the zone is not a shape. Here you can see the logging in the ZoneTagHelper and in the ZoneTag.

Log warning when Zone is not a Shape

Add documentation on Query API results changes

If you called the api/query/{name} endpoint in Orchard Core 1.0.0, the query returned with the following schema:

[
    {
        "Id": 321,
        "UserName": "test",
        "Email": "[email protected]"
    }
]

If you upgraded to Orchard Core 1.1.0, this endpoint returns the data in a different format:

{ 
"items":
    [
        {
            "Id": 321,
            "UserName": "test",
            "Email": "[email protected]"
        }
    ]
}

To make sure you handle the response correctly, the documentation of Orchard Core has been updated to reflect these changes.

Documentation on Query API results changes

News from the community

Orchard Core Commerce MVP planning and survey

A few weeks ago you could see a nice demo about the Orchard Core Commerce module. And in that blog post, we also mentioned that Lombiq provides stewardship for this module. That actually means that we will do code reviews, and work on features and fixes. To have that, Márk Bartha (who is the project leader from our side) started this thread and added this survey. This is about asking the community what the most important features for you would be in an Orchard Core-based e-commerce solution. If you do e-commerce or if you have an opinion about e-commerce, please share your opinion here. The point of this is to try to do not all the things but focus on what is really needed first.

Orchard Core Commerce Survey

Orchard Dojo Newsletter

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

2 Comments

  • Michael said Reply

    How may I get looped in to the Commerce discussion? I visted the Github issue and weighed in there; then I found this survey and figured, fine, reiterated my concerns there. But it seems to have fallen into a vacuum or a black hole, I cannot decide which. Thank you...

    • Zoltán Lehóczky said Reply

      The survey is still ongoing, hence why we're repeating it here. We'll close it soon and then publish the results, as well as update the community about the roadmap.

Add a Comment