Display mode options to Parts, Search views for themes - This week in Orchard (14/02/2020)

Gábor Domonkos's avatar
Orchard Harvest, Documentation, This week in Orchard, Recipes

Display mode options to Content Parts, adding search views for themes, import recipe from a JSON file and many other changes and new features come in our current post. After we will see a real-world example about how to use Orchard Core in production. Then check a new website built with Orchard Core and finally let's talk about the latest news about the Harvest!

Orchard Core updates

Add revision date in the documentation

Now each page of the documentation will display the revision date of the current page. Open any page of the documentation and scroll down to the bottom of it. There you will see the date of the last update.

Use ControllerModelUpdater on controller instead of implementing IUpdateModel

When you want to Build, Update or Validate your model from controllers, you don't have to implement IUpdateModel, because each of them can be resolved by injecting the IUpdateModelAccessor. Here you can see the NodeController, where we need to build the display for the AdminNode using the TreeThumbnail display type (line 74). Instead of passing this, we can pass the _updateModelAccessor.ModelUpdater.

Only show fields in Summary and Detail display types

In the past, if you added a field (or a few fields) to a blog it's SummaryAdmin view shows in the list of blog posts. That's because the fields are automatically displayed in SummaryAdmin. Now, this feature prevents to display all the fields automatically in the SummaryAdmin. If you check out a driver of a field, you will see that the values of the Location now changed everywhere in the case of the Initialize method.

Add display mode option to parts

Now we can have custom display modes for Content Parts too! For example, now you could define which tag would you like for the title and the name of the tag could be the display mode of the TitlePart.

Fix themes search views fix

Changing all the themes to provide a nice view for the search feature. There was a default version of it, but now each theme has it's own and now it looks great in every built-in theme. If you want to change the look of the search form, you would override the SearchForm template, if you would like to override the search results page, the SearchResults template will be the one you are looking for. But of course, you can override the whole look and feel of the search template just by overriding the Search template. Here you could see the Agency theme with the search form and search results.

And you could find really great and detailed documentation about how to implement a website full-text search and everything about the new templates.

YesSQL: when to call Session.Save?

You can call _session.Save(contentItem) as many times as you want, it's free. It's just marking a content item to be saved once the session will be disposed. There will nothing happen when you call _session.Save(contentItem). If you call it multiple times, the first time it will mark it, the second time it will say: It's already in the dictionary of things to be saved. It will be just a dictionary lookup. Call _session.Save(contentItem) when you think the thing should be saved once the session or the request is done. And if multiple things update a content item and you need to tell the session to save it, they can all call _session.Save(contentItem).

Import recipe from a JSON file

When you are importing a recipe, you have to upload a ZIP file. The logic then extracted that file and found the JSON file in it. From now you can pass a JSON file when importing a deployment package, not just a ZIP.

Recipes documentation

And if we are talking about that you can import a recipe from a JSON file, we also need to mention that the documentation of Orchard Core has got a great detailed page about the recipes. Here you could see the format of the recipe, the possible steps of the recipe and see samples about each of the steps (Roles Step, Queries Step, Media Step, Layers Step, etc.).

RequireUniqueEmail message

Now when you would like to register a new user with an email address, that already exists in the system, you will get an error message says that the email is already used.

Demos

SaaS and OpenID: a real-world example

There is a solution called Trivest Connect (an Enterprise Resource Planning application) that currently includes five different companies. One problem that Trivest solves that everybody sends messages to each other and there is no standardization, that is not so optimal. In the use of Trives Connect with many other features there is a standard document format and with that, it is easier to exchange orders, invoices, VIA, etc. Trivest Connect is based on Orchard Core installed with the Software as a Service recipe that is using the built-in Open ID Server. Here you could see that there are really just a few modules enabled in the admin UI.

What customers can do is they can send messages to other customers. This is just an administrator portal because, in reality, this is all done behind the scenes in the ERPs.

If you would like to see the whole demo of this real-world example just head to YouTube and watch the recording!

News from the community

A new website using Orchard Core

RA Capital Management is a multi-stage investment manager dedicated to evidence-based investing in public and private healthcare and life science companies developing drugs, medical devices, and diagnostics. And they decided to use Orchard Core to implement their website!

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. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier it is now maintained by our team at Lombiq Technologies.

Latest news about the Harvest

There is a new offer from someone from the UK to host Harvest in their offices. They mention 50 people fit in the office. This office is located in London. The possible date for hold the Harvest is the last full week of June. We have to decide the length of the conference and talk about holding a workshop during Harvest. By the past, we have usually done it at the beginning of the week, because this way you can arrive at the weekend, take your time or get back from jetlag or do some tourism. And then if you want you can extend your stay to the week. So 22-23-24 might be the tentative dates. Usually, 2 days are too short and 3 days are too long, but we will see. What do you think about June 22-23? Feel free to comment on that on Gitter too!

Orchard Dojo Newsletter

Now we have 116 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!

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 week's Orchard meeting!

No Comments

Add a Comment