Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Featured tags

IIS
API
SMS
SEO
All tags >

This week in Orchard - 08/16/2019

More Razor helpers, advanced Liquid support in GraphQL, a new OrchardCore.Application.Cms.Targets meta package, Full-Text-Indexing and updated milestones for Orchard Core. Want more? Then check out our current post! On Orchard Core Added Liquid support to Markdown GraphQL query We have a property in GraphQL for instance called Html on Markdown and HTML body. The new thing is that this Html property on the Markdown body was evaluating the Markdown of the content item. On the client you can directly have the Markdown evaluated, but not the source Markdown. But what was missing is that this Markdown in this body could also have Liquid. It would not interpret the Liquid syntax. Now the method first evaluates the Liquid and then convert the Markdown. Added Liquid Razor Extension Method & Markdown Helper parses Liquid Two extensions, one just to render Liquid as IHtmlContent and the other to render Liquid as a raw string that can be passed to another extension method like the markdown helper. LiquidToHtmlAsync: parses a Liquid string to HTML as IHtmlContent. MarkdownToHtmlAsync: converts Markdown string to HTML. See the updated documentation about the LiquidToHtmlAsync, and MarkdownToHtmlAsync helpers. Documentation to explain how to generate PO files Documentation to explain how to generate PO files has been merged with the tool called PoExtractor. That tool will analyze all the source code and extract all the strings that are used in the localizer. A new OrchardCore.Application.Cms.Core.Targets core CMS meta package There is an OrchardCore.Application.Cms.Targets already that you can point to. If you reference this NuGet package in your project, the CMS will just run and all the dependent Nuget packages will be downloaded. It's also linking all the themes that we have in Orchard Core and there is no way to remove them. Let us introduce a new package, called OrchardCore.Application.Cms.Core.Targets, that just contains the modules and only the TheAdmin theme. In this way you can just reference your own themes and not the other ones, that will make your deployment smaller. So, OrchardCore.Application.Cms.Targets contains every theme that we have in the solution and OrchardCore.Application.Cms.Core.Targets is just the TheAdmin theme. Full-Text-Indexing in Orchard Core This is the settings page of a Content Picker field. Here you can see the following settings: include this field in the index: be able to include the value of this element in the index. stored: when you want the value of the field to stored with the Lucene index. analyzed: when you want the content of the field to split into different words. It means you can search by word and not as a whole. Also, simplify every word, so you can find the root of the word like depends, depending will be converted to depend. sanitized: when you want to remove any HTML from a field. So HTML tags will be not available when you search. tokenized: when you want to convert the value of the field with some custom Liquid logic. Here you can take the content of the field and you can convert it using a Liquid filter and do some computation and so on. If you go to a created content item, you can see there is an option for Full-Text-Indexing in Liquid, that determines if this content type can use a customizable full-text index field by using Liquid. The Liquid template here is accessible in queries with Content.ContentItem.FullText. You can use the Model helper to reference the current element. This feature is still under development and hasn't available in the dev branch yet. Orchard Core updated milestones and Roadmap The milestones have been updated in GitHub of Orchard Core. There are more of them now: rc: we still have the rc for September 23. 1.0: now we have a 1.0 milestone for late October. 1.1: which means the next major release. 1.0.x: some bugs we need to fix that not blocking 1.0, but have to be fixed before a major release. backlog: good idea, will see when we can do that. Let's have a look at our Roadmap! On Lombiq Orchard Dojo Newsletter Now we have 91 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! There will be no 'This week in Orchard' post next week because of vacation, so see you in two weeks!

This week in Orchard - 08/09/2019

Getting closer and closer to the release of .NET Core 3.0 and Orchard Core RC! What do we need to ship the new version and what are the newest features of Orchard Core? Find out now! On Orchard Core Updating YesSql In SQL server it was not working correctly if you pass the parameter as the limit value. You can do SELECT * FROM FOO @limit, where the @limit is the parameter. That will be converted to SELECT TOP @limit FROM FOO in SQL server, but that doesn't work. When you use a variable like this it needs parenthesis. Now every time when we render it in YesSQL, it's in parenthesis: SELECT TOP (@limit) FROM FOO.You can also find a xUnit test in the SqlParserTests.cs file, where the parameters of the InlineData attributes are also using parenthesis. Ability to extend/clear ContainedContentTypes Now if you want to update the ContainedContentTypes of the Container Part then you can do that. Before that, if you add a type it removes the old one. Now you can choose to merge it with the existing one. And by using the ClearContainedContentTypes extension method, you can also clear the ContainedContentTypes. Remove JSON specifier from GraphQL MD code blocks The documentation used the JSON highlighting for the GraphQL queries, which is the closest to a GraphQL query, but it's wrong. It could show some wrong colors, so now it's just doing nothing. A GraphQL query is not a JSON payload, just the result of the query. .NET Conf 2019 There will be the .NET Conf next month, which is a 3-day virtual developer event co-organized by the .NET community and Microsoft. Sébastien is submitting a talk about Orchard Core modularity and multitenancy. We hope that he will able to get a talk! On these days they launch .NET Core 3.0, which is the 23rd of September. A plan is to ship Orchard Core RC on the day after the .NET Core 3.0 and the builds are available. Upgrading an Orchard Core site that using .NET Core 2.2: it's non-breaking in terms of database or recipes and everything. We are just upgrading the APIs from 2.2 to 3.0. So, in theory, if we take a site that has been built with 2.2 and we just upgrade to the branch that using 3.0, then it should not change anything. The only thing it should change hopefully is the performance of the site because .NET Core 3.0 is much faster and use less memory than 2.2. The image of .NET 3.0 will also be available on Docker. To ship Orchard Core RC, we only need to have finalized all the things for localization. We have most everything we need, instead of the field syncing. Let's have a look at our Roadmap! You can see that everything is implemented from the backlog. Adding more localization packages will not be that hard, the repositories are already done for these packages. And we have PRs for almost every bonus features that listed in the roadmap. We also need to focus on every issue in GitHub that marked for RC and has a priority tag on it. A new website using Orchard Core Patient Access connects you to healthcare services when you need them most. Book GP appointments, order repeat prescriptions and explore your local pharmacy services. This site is running on Docker for Linux on Azure as an Azure Docker Service on Linux. It's based on GraphQL. For example, when you navigate to Pharmacy services and searching for healthcare services, then it's GraphQL. If you search for Hay fever treatments and using S66 as the postcode, the results that you got is returned by GraphQL. 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. On Lombiq Orchard Dojo Newsletter Now we have 88 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!

This week in Orchard - 07/26/2019

The .NET Core 3.0 Preview 7 is here! So from now, the community can start working on to update Orchard Core to .NET Core 3.0 Preview 7. That will be a huge change, but it is one of the most important updates of Orchard Core RC. Read our post for more! On Orchard Core Vue.js use proper CDN Now the Vue.js using the proper CDN, which is jsDelivr. jsDelivr provides mirrors for npm, GitHub, WordPress plugins, and custom endpoints for several other projects with special requirements. We think it is the fastest CDN and it works in China also. Note that most of the CDNs don't work in China. <script asp-src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js" debug-src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js" asp-name="vuejs" at="Foot"></script> .NET Core 3.0 Preview 7 .NET Core 3.0 Preview 7 released this week. You can think about this release as the RC (Release Candidate) version of .NET Core because this was the latest version where the developers added new features to the framework. From now only bug fixes and minor changes will come until the GA (General Availability) of .NET Core 3.0, that is scheduled for September 2019. Now, let's check out the newest release of .Net Core 3.0 here! You can see that the new version support Visual Studio 2019 and .NET Core 3.0 should be used with the latest previews of Visual Studio. So, don't forget: if you try out .NET Core 3.0, use the latest preview of Visual Studio 2019. Other versions of Visual Studio 2019 are not recommended, but you can enable .NET Core SDK previews in Visual Studio. This article explains how can you do that. If you may not have heard: the community might ship the RC version of Orchard Core when the .NET Core 3.0 is shipped because it will be faster and will contain more features. So from now, the community can start working on to update Orchard Core to .NET Core 3.0 preview. That will be a huge change, but it is one of the most important updates of Orchard Core RC. ByTutorial mentioned Orchard Core ByTutorial is a place where you can read great articles mainly about tips & trick about web development both about back end and front end. A few days ago they wrote an article, where they published a list about 7 available popular open source .NET CMS's you can choose from and Orchard Core is one of them. You can read the post here! Adding IShellConfiguration documentation Orchard Core extends ASP.NET Core IConfiguration with IShellConfiguration. Understanding IShellConfiguration maybe not so trivial for the first time, so it's very helpful to make a documentation about it. Thanks to Dean Marcussen for the docs! On Lombiq Orchard Core demo in Singapore There was a meetup at March 15, hosted by .NET Developers Community Singapore, about Hastlayer, Posits, and Orchard Core, where three members of Lombiq gave sessions about the mentioned topics. In Benedek Farkas's presentation, you heard the summarized history of the Orchard project and got an introduction to Orchard Core both from a user's and a developer's perspective. In this presentation, you'll hear the summarized history of the Orchard project and get an introduction to Orchard Core both from a user's and a developer's perspective. And now the recording is available on YouTube! Check it out now! Orchard Dojo Newsletter Now we have 84 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!

This week in Orchard - 07/19/2019

New Media Library web search providers for Orchard 1.x, improved documentation, and demo about the ability to set localization cookie when using the Content Culture Picker in Orchard Core. Read our post for the latest news around Orchard! On Orchard 1.x Demos New Media Library web search providers If you navigate to the modules, you will see some new ones in the Media category: now you can have Bing, Google, and Pixabay web search providers! Let's enable them and see how you can use it. For any web search provider that you would like to use you need to have an API key and provide them to Orchard under Settings -> Media. Now head to the Media Library and hit Import. Then select Web Search from the list to get the Search text box and a select list near that. Here you can use those web search providers, that you have provided an API key for. For example, let's choose Pixabay. If you select one or multiple files and hit the Import button, the selected files will be downloaded and Orchard puts them in the folder you have previously selected. Thank you for the contribution to Milán Keszthelyi from Lombiq Technologies! On Orchard Core Role-based permissions to display admin menus In the following GIF, you can see two admin menus (admins only and contributors only). Their visibility is configured from the roles page. If you logged in as an administrator, you can see both, but if you are a contributor you can only see one of them. Being able to see an admin menu doesn't mean you can see everything inside it, of course, normal permissions still apply. For example, a contributor can see the link menu, but can't see the content types links if they don't have the right permissions for them. Consuming Content Parts and Fields using C# For a while now it's possible to get strongly typed versions of Content Parts and Fields using Orchard Core. Thank's to John Rom, he wrote great documentation about how you can do that! Demos Content Culture Picker - Add ability to set Localization Cookie Last week we wrote about the Content Culture Picker feature of Orchard Core. The Content Culture Picker module helps you to manage cultures for the frontend and now comes with two now options you can set. If you enable the Content Culture Picker module, you can head to Configuration -> Settings, where you will see a new option, called ContentCulturePicker. Here you can decide to set the localization cookie when switching between cultures (this is enabled by default) and to redirects to the homepage of the target culture if the ContentItem of the target culture does not exist. The documentation is also updated about how to set the cookie from the admin site of Orchard Core or by using a recipe step. On Lombiq Orchard Dojo Newsletter Now we have 80 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!

This week in Orchard - 07/12/2019

Lots of new features and improvements and a very interesting demo about the Content Culture Picker is waiting for you in our current post! Oh, and of course our Orchard Core Training Demo Module has got a huge update too! On Orchard Core Set Content Types during Azure Blob creation When uploading a file, for example, a PDF into Orchard the Content Type is set to "application/octet-stream" on the Azure Blob when it should be "application/pdf" (this is the content type that Azure itself picks when you upload a PDF directly). Now Orchard Core has the fix that sets the blob properties during creation. Improve ImageSharp Middleware Processing Speed Because /Media is a well-known location we could improve the processing speed of the ImageSharp middleware and reduce the allocations it makes on every request. At the moment the MediaFileProvider returns IsValidRequest which is the first opportunity for ImageSharp to drop out of the processing pipeline. The first check in IsValidRequest checks for a valid image extension in the URL using Request.GetDisplayUrl(). If we check Request.Path for contains Media first we can bypass all the allocations from Request.GetDisplayUrl() and _formatUtilities.GetExtensionFromUri(...). Let' see the MediaFileProvider now! The IsValidRequest method here first checks that the first segment of the path is equal with the Startup.AssetsRequestPath. The AssetsRequestPath contains PathString("/media"). Add grouping of widgets to their site layer The GraphQL siteLayers query enhanced to group widgets into their layers. In the following screen, you can see that there are two widgets in the Always layer and one on the Homepage layer. Add PathBase PathBase may contain a virtual folder and, before the execution of the tenant pipeline (e.g. when executing a middleware configured at the app level), it doesn't contain the tenant prefix yet. PathBase = /{virtualFolder} - Path = /{tenantPrefix}/somePath// If no value => {}, converting the PathString to a string results in an empty string. Then, when we are in the tenant pipeline (e.g. when executing a middleware configured at the tenant level e.g. by a module), the tenant prefix (null for the default tenant) has been moved to the PathBase. PathBase = /{virtualFolder}/{tenantPrefix} - Path = /somePath In some contexts, we don't have to care about this e.g. when using the URL helper for an action, but here, how we build URLs, this is not the case. So, here it was not working under a virtual folder, the fix is to use PathBase but without reusing the tenant prefix. _contentItemlistUrl = httpContextAccessor.HttpContext.Request.PathBase + "/Admin/Contents/ContentItems1/";var formActionWithoutTypeName = Context.Request.PathBase + "/Admin/Contents/ContentItems"; LocalizationSettings recipe step documentation The Localization section in ReadTheDocs of Orchard Core has been updated with how to add cultures with recipes using the settings step. Demos Content Culture Picker When you enable the Content Culture Picker module, you will get a culture picker shape for the frontend. The Content Culture Picker module helps you manage cultures for the frontend. This uses a dropdown listing all the supported cultures and you select which culture you want to see when you are on the website. The Content Culture Picker selects the URL to redirect to like: if the ContentItem has a related ContentItem for the selected culture, it redirects to that Item if a HomePage is specified, finds the ContentItem that is set as the Homepage and attempt to find a Localization of this ContentItem for the current culture or a NotFound() page Let's see how it works! To create localizable content items, you have to enable the Content Localization module. This module will provide you the LocalizationPart, that you can attach to your content type. For the sake of the demo, we set up the site with the Blog recipe and attached the LocalizationPart to the Blog Post Content Type. Then head to Configuration -> Settings -> Localization to add more supported cultures. Now head to the editor of a content item that has LocalizationPart attached and save or publish it. You can see that our default culture is English and we added 3 other supported ones. If you click one of the cultures, the localized version of the content will be created. We created slightly modified blog posts for each culture to be able to see the differences between them. Now it's time to use the Content Culture Picker! You can find detailed documentation on ReadTheDocs about how to use the picker and what shapes are available for the frontend theme. For now, let's just simply modify the Layout.liquid file of the TheBlogTheme and using the liquid syntax, use the shape shape tag to create and render the ContentCulturePicker shape. We added a white background behind the picker to see it better. Now if you visit one of the blog posts you can switch between them using the content culture picker. On Lombiq Orchard Core Training Demo Module V2 Orchard Core Training Demo module is a demo Orchard Core module for training purposes guiding you to become an Orchard developer. You can use this module as part of a vanilla Orchard Core source that including the full source code - which is the recommended way. You can use it as part of a solution the uses Orchard Core NuGet packages, however, it's harder to look under the hood of Orchard Core features. The module assumes that you have a good understanding of basic Orchard concepts and that you can get around the Orchard admin area (the official documentation may help you with that). You should also be familiar with how to use Visual Studio and write C#, as well as the concepts of ASP.NET Core MVC. Now, this module has got a huge update with new tutorials: permissions, admin menus, site settings, caching, file management, background tasks, and VueJS! In the StartLearningHere.md you can find all the training sections to easily navigate to the topic that you are interested in. Orchard Dojo Newsletter Now we have 78 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!

This week in Orchard - 06/14/2019

In our post you could read a demo about the GraphiQL explorer improvements. But first, check the other new features of the admin site of Orchard Core and the new docs too! Check out our post for more! On Orchard Core Add Codemirror Liquid editor to Autoroute Pattern setting Now when you edit the AutoroutePart using the admin site you have a liquid editor to provide the pattern used to render the custom URL of the content type. Fix content picker width with breakpoint and making the content items reorderable If you edit a content type that has a content picker, you will see that now the picker has a correct width when displaying the screen in different sizes. You can also reorder the picked items by using a simple drag-and-drop. Furthermore, if you hover your mouse over the picked items, you will see the changes of the cursor. Extend Facebook Documentation The OrchardCore.Facebook module has finally been merged to the dev branch! It's also got updated documentation about the Facebook Social Plugin Widgets and about what are the available settings when you would like to register a Facebook App with your Orchard Core site. If you are interested in this module, we have written about it a few weeks ago! Add documentation for overriding Views New documentation has been added to the ReadTheDocs page of Orchard Core about how to override existing views that come from modules in your theme. Add View button to media library items Now when you navigate to the Assets and select or hover over a media library item, you will see a new view button under each item in order to preview the file and easily copy the URL. Demos GraphiQL and GraphiQL explorer improvements Last week we showed the new GraphiQL explorer. Since then, the explorer has got some new features. First of all, it now allows filtering and returning of the localization part data. Until now we don't currently have a way to expose a list of all the media assets stored in the media library so please welcome the new mediaAssets query to return the available assets. This is useful when using Orchard as a headless CMS with for example Gatsby to statically compile images into the website. In the screen above you can see a query to list every item from a folder called Backgrounds. You will notice a new property of every content type, called Render. If you check the box near render and run the query you will get the following result. The render property of the blog post, in this case, will show you how will a blog post be rendered. This is a full HTML of the page with a title and everything. This is exactly like you would have if you look at the source code of the page in the browser when opening the given blog post. Let's see how does it work! The assumption was that it should be very easy to render a shape and the way it was done was more complex than necessary. The render property rendering the shape from build display of the content item with any display types. You just need to call the displayHelper.ShapeExecuteAsync! That's all you need to do from a shape to render it. In GraphQL this works in the following way: using (var sw = new StringWriter()){ var htmlContent = await displayHelper.ShapeExecuteAsync(model); htmlContent.WriteTo(sw, HtmlEncoder.Default); return sw.ToString();} So just call displayHelper.ShapeExecuteAsync and pass a shape to it to get the IHtmlContent which can be written to a TextWriter! On Lombiq Orchard Dojo Newsletter Now we have 72 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! 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!

This week in Orchard - 05/17/2019

In our post, we would like to give you some tips about how to write localizable text in Orchard Core. We check the new User liquid filters, the new Twitter integration and many more! On Orchard Core Add various User liquid filters We already had the User object in liquid and now we have the has_permission filter to check for named permission and optionally a resource to check for. We have the is_in_role filter to check if the user is in the role and the has_claim filter to check if the user has a claim of the specified type. Workflows Internalization This PR has three changes related to localization. First of all, the State text in the OrchardCore.Workflows/Views/Workflow/Details.cshtml file was not translated. The second one is more interesting. In the OrchardCore.Workflows/Views/Workflow/Index.cshtml we render the status of the workflow. The status can be Idle, Starting, Resuming, Finished and so on. This is an enumeration. These will be rendered as is in the output, they were not translated. Translating as you can see here could be fine because it's just a static value. The issue is nobody will be able to translate them because we don't know they have to be translated. The solution, in this case, is to use a switch statement. So, enums should be localized using a switch statement that resolves to calls to T[] with the static string inside it. This way our tool will be able to pick it up and add the entry in pot files. The last point for translation is tricky. It's not a dynamic value (a class) and it can't be solved with a switch. The solution here is to add a new property on the activity to return a localized string, like DisplayText. Add create new option to Publish and Save Draft buttons Now we have a Publish button with one suboption called Publish and continue.This PR extends this and adds a new suboption which is Publish and create new. The Save Draft button will also get a new option to Save Draft and create new. Twitter client and update status workflow activity In this PR, Michael Petrinolis extends Twitter Module with a Twitter API client and an Update Twitter Status workflow task. To use the new Twitter integration and the new Update Twitter Status activity, you need to enable the Twitter Integration module. Now you can navigate to the Twitter Integration page in the admin site, where you need to provide four different settings: API key: The API key defined in the Keys and tokens tab of the Twitter app dashboard. API secret key: The API secret defined in the Keys and tokens tab of the Twitter app dashboard. Access Token: The Access Token defined in the Keys and tokens tab of the Twitter app dashboard. Access Token Secret: The Access Token Secret in the Keys and tokens tab of the Twitter app dashboard. To get these settings, you need to create a new Twitter application where you can get these values. Now you can use the new Update Twitter Status Task. Let's say we would like to post a new tweet when a new blog post has been published to our site. We can use the Content Published Event as a startup task and set the Blog Post content type to filter on. After add the Update Twitter Status Task and provide a title and a template for updating Twitter status. Bethany Christian Services using Orchard Core Bethany Christian Services using Orchard Core for their website. Bethany believes every child deserves to be loved, connected and empowered through the family. Bethany is a global nonprofit that supports children and families with world-class social services, all designed to help families thrive. APS Medical Billing Solutions using Orchard Core APS understands that it takes experience to run a successful healthcare business, and they are dedicated to finding solutions that fit your specific practice requirements. The team of qualified medical billing specialists work with each practice to create value through customized service. 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. On Lombiq Orchard Dojo Newsletter Now we have 61 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! 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!

This week in Orchard - 05/03/2019

The content localization for Orchard Core reached a huge milestone! Don't hesitate to read our post about the newest awesome features of the CMS! On Orchard Core Apply dynamic content type permissions to Admin Menu The dynamic content type permissions are now implemented. In the past they were not supported in the navigation (you clicked on the menu and got a permission error message), now the admin menu reflects the permissions. You can see an example of this in the following GIF. There is a user who logged in with a contributor role. If the admin adds or removes permissions, the admin menu reflects the changes and hides/shows the options in the New, Content Types and List Admin Node menu. Features bulk actions Now you can enable multiple features at the same time. In the past, we had the checkboxes, but we were not taking them into consideration. If you navigate to Configuration -> Modules and open the select list near the Actions, you can see that now you can enable, disable and toggle the features that you have selected using the checkboxes before them. Use Bootstrap modal instead of browser confirm When you have to confirm an action (like Delete), we're using a Bootstrap modal instead of the native browser popup, so it looks nicer. And of course it's also localizable in the following way: <div id="confirmRemoveModalMetadata" data-title="@T["Delete"]" data-message="@T["Are you sure you want to remove this element?"]" data-ok="@T["Ok"]" data-cancel="@T["Cancel"]"></div> This div has data attributes in it (for example title and message) and we localize the text here that we want to include to JavaScript. From JavaScript, we load the element by ID and get its data which is the localized text. You don't inject localization in JavaScript, you inject it in HTML for encoding and security reasons. Orchard Core Translations repository By using this repository, we will automatically get all the localizations from Crowdin. There will be an AppVeyor script, that will automatically list all the localizations from Crowdin and generate a NuGet package for each of the languages and then push it to NuGet. So, the AppVeyor script will download the files, create a package and publish it to NuGet. This package will contain the AppData with the exact structure, so it will contain the pot files for the language. ASP.NET Core - App Building Workshop There was an app building workshop, where developers created something using ASP.NET Core. The demo is about building a conference agenda website. Sébastien did it also in Orchard Core to be sure you can do the same thing in Orchard. In our documentation, we have a Guides section and there is a tutorial called Building a Website from a Web Template (TBD). With the help of this conference, we could write this section soon. RTL support for TheAdmin theme The latest issue was to merge this PR was to do not manage two different files and then to have some condition in the theme to check the current culture and then switch between the CSS files. The goal is to have only one single CSS file and thanks to Hisham Bin Ateya this PR now merged. Demos Content localization If you would like to make your content items localizable you have to enable the Content Localization module. Then you can head to the Configuration -> Settings -> General page and hit the Add or remove supported cultures for the site link and add supported cultures for the site. Let's add some cultures! Now you have an enabled Content Localization module and added some supported cultures to your site. Time to do some content localization! By enabling the Content Localization module, you can attach a new content part, called Localization to the content type that you would like to localize. Let's edit the Blog Post content definition and add the Localization part to it! When you install your site using the Blog recipe, you have one predefined blog post. If you would like to edit your blog post, you will get the following screen. You will notice that you cannot add a new localized instance of your content item until you do not save the existing one. By saving a content item that exists before, you will create the localized version of the content item, in our case the Hungarian version will be created, because this is the default culture of our site. After saving the content item you will notice that the editor has changed. The list of the cultures this site supports appears with a little plus sign before each culture. By clicking one of the plus signs, a new localized version of the content will create, keeping the content of the item. If you navigate back to Blog, you will see a little badge icon under each blog post showing the culture of the content item. Notice the new Localizations button. By clicking on it, you can create a new localized version of the content item or edit an existing one. Now if you edit the Hungarian version of this blog post, you will see the changed icon before the Qafar. That's because a content item with that culture already exists and by selecting the Qafar version, you can edit the existing content item instead of creating a new one. Thanks to JP Tissot, this feature will be merged to dev soon and with this PR, we will reach a huge milestone towards supporting localization in Orchard Core! On Lombiq Orchard Dojo Newsletter Now we have 59 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! 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!