This week in Orchard - 06/28/2019

Query, Localization, This week in Orchard

New queries for GraphQL to return all the configured layers and their widgets and to have access to the site's configured culture settings, and other smaller changes and fixes for Orchard Core are waiting for you in the current post!

On Orchard Core

Package.json or package.json?

If you are using Orchard Core in a Windows environment, you should not to be worried about you have a Package.json or a package.json file. But if you run npm install for example on a Linux operation system, this command will fail because Package.json had the wrong case. So, instead of Package.json, you should call your file to package.json to work with every environment.

WYSIWYG editor converts <div> to <p> tag

Orchard Core uses Trumbowyg, that is a lightweight WYSIWYG editor when you would like to create a new content item using the dashboard. By using Trumbowyg, you can view and edit the HTML source too. When you edited the source and used <div> tags, the <div> tags automatically converted to <p> tags. In the trumbowyg.js file, you can find an array, called DEFAULT_SEMANTIC_MAP.

Semantic generates a better, more semantic oriented HTML (i.e. <em> instead of <i>, <strong> instead of <b>, etc.). Since 2.12.0 you can also put an object to customize the semantic tag mapping for each one of these tags: <b>, <i>, <s>, <strike>, <div>. The issue was in this map, the <div> was converted to <p>. Now it has been fixed.

Top Open Source Asp.net Core Content Management Systems (CMS)

DotTutorials was developed to give .Net Developers a place to find step by step solutions for their coding problems. They plan to provide the solutions of some of the common & unique programming problems with complete source code for educational & commercial purposes, and in addition, helping developers stay up to date with the latest DotNet Libraries. They have an article in which they list down some top Content Management Systems (CMS) available for .Net Core Developers. And as you can see, Orchard Core is in the list too!

Creating an Orchard Core .NET Core Project From Scratch

Hofmeister Christian wrote a blog post about how to create an Orchard Core project from scratch. In this guide, he shows how to set up a custom Orchard Core CMS Web Project. He wrote the blog post in German, so if you speak this language, head to his site and read the post!

Implemented siteLayers GraphQL query

You have a new query that will return all the configured layers and their widgets. This could be useful for defining header/footer content on GatsbyJS or similar sites. Let's see how you can use it with the GraphiQL Explorer!

You can see that you can get the description, the name and the layer rule of your layers. If you place widgets in those layers, you can get the details of them too! Using siteLayer you can create more complex queries like:

query LayersQuery {
siteLayers {
description
name
rule
widgets(status: DRAFT) {
widget {
contentType
... on Markdown {
markdownBody {
html
markdown
}
}
}
position
renderTitle
zone
}
}
}

Implemented siteCultures GraphQL query

If you use the siteCultures query, you can have access to the site's configured culture settings. We defined 4 supported cultures and made the Hungarian as the default. Now let's run this query using the GraphiQL Explorer!

You can see that the default shows that the Hungarian localization is the default one.

On Lombiq

Orchard Dojo Newsletter

Now we have 76 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 every time when 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!

There will be no 'This week in Orchard' post next week because of vacation, so see you in two weeks!

No Comments

Add a Comment