Contents with the Orchard Core Nuggets Tag Node
-
How to change the idle logout time in Orchard Core - Orchard Core Nuggets
Orchard Core Nuggets, Orchard CoreKeeping user accounts secure is important. One aspect of this is to constrain how long people can remain logged in: If they share a device, especially a public one, then it's better to be on the safe side and automatically log them out after some time of inactivity. Here is how you can do it in Orchard Core!
-
How to do a security scan of an Orchard Core app - Orchard Core Nuggets
Orchard Core Nuggets, Orchard Core, Security, Security Scanning, Zed Attack Proxy (ZAP), Security scanning with ZAP in the Lombiq UI Testing Toolbox - This week in Orchard (22/12/2023)You don't want malicious people to crack your web apps to use them for spamming, cryptocurrency mining, and spreading malware, nor do you want them to get access to your users' personal data (if you actually do want to cooperate with criminals, you don't need to read further). Thus, you want your app to be secure. One aspect of achieving this is to do penetration testing on your app. Thankfully, much of this can be automated, and with the help of Lombiq UI Testing Toolbox for Orchard Core and Zed Attack Proxy (ZAP) you can conveniently do this for your Orchard Core app. Let's see how!
-
How to debug a NuGet-based Orchard Core solution - Orchard Core Nuggets
Orchard Core Nuggets, Orchard Core, NuGet, Debugging, Shape Tracing Helpful Extensions, Alt and Class attributes for the Image Shortcode - This week in Orchard (28/08/2020)How can you debug Orchard Core code when you’re working with a solution that loads Orchard packages from NuGet? Orchard’s packages are built with symbols so you can actually use them as source too!
-
How to access services from another tenant in Orchard Core - Orchard Core Nuggets
Multi-tenancy, Orchard Core Nuggets, Orchard Core, OpenAPI, Swagger, Taxonomy Localization - This week in Orchard (12/06/2020)The multi-tenancy feature of Orchard Core is great: A tenant is basically a subsite with its own independent content and configuration, under its own domain or URL prefix. You can use tenants to e.g. host websites for multiple customers of yours from a single Orchard Core app. The sites won't know anything about each other but they'll run from the same app built from the same codebase, and have access to the same modules and themes. This makes maintaining such sites very efficient, both for hosting and for development.
What if you want tenants to be not that isolated though? What if there is certain content or configuration that you actually want to share among tenants or some functionality that you want to centralize on one tenant? You can use the APIs we show below to cross tenant boundaries and use any service from another tenant!
-
How can I call an external API from a workflow task? - Orchard Core Nuggets
Orchard Core Nuggets, Workflows, Short codes, new content filters - This week in Orchard (22/05/2020)You have several options to send an HTTP request to an external API in Orchard Core, but maybe you haven't tried the Http Request Task. Let's see quickly how you can hook up a workflow!
-
How to fix "InvalidDataException: Form value count limit 1024 exceeded." in Orchard Core - Orchard Core Nuggets
Orchard Core Nuggets, Orchard Core, ASP.NET Core, Exception, Flow Part, Named style and script Tag Helpers, This is Lombiq! - This week in Orchard (09/05/2020)Let's suppose you're building your shiny new Orchard Core website. In there you're also building a shiny new page, with Flow Part obviously. You throw together a lot of widgets to get all the bells and whistles on the page, then you save it and BAM! Internal Server Error: "InvalidDataException: Form value count limit 1024 exceeded." What's this, did I break Orchard? Is Orchard trying to break me? Let's fix this!
-
How to add a breadcrumb menu in Orchard Core - Orchard Core Nuggets
Navigation, Orchard Core Nuggets, Orchard Core, Breadcrumbs, Named style and script Tag Helpers, This is Lombiq! - This week in Orchard (09/05/2020)A breadcrumb menu is a simple but effective navigation aid that shows the user where they are in the site's content structure and which path they can take back. It's also part of the web accessibility guidelines. However, there's no feature built into Orchard Core for this. Nevertheless, how to create a breadcrumb menu?
-
How to add a culture URL segment for localization in Orchard Core - Orchard Core Nuggets
Localization, Orchard Core Nuggets, Orchard Core, ASP.NET Core, Content Picker Menu Item, Kast case study - This week in Orchard (02/05/2020)So you're building a localized Orchard Core site and want all URLs to be in the form of /culture-name/rest/of/the/url, e.g. /hu-HU/my-page. (Figure out what "hu-HU" is! Hint: It's not an owl, neither a rock band from Mongolia!) What do you need to achieve this?
-
How to add a favicon under /favicon.ico in Orchard Core - Orchard Core Nuggets
Orchard Core Nuggets, Orchard Core, Favicon, ASP.NET Core, Click to deploy improvements, autoroute container routing - This week in Orchard (24/04/2020)Every website needs a favicon of course and you can easily add one to your Orchard Core site from a theme or module with a
link
tag in a template. However, there's a catch: Certain browsers will still search for it (as a first attempt) under the path /favicon.ico. This can be a tiny bit detrimental to the client-side performance, and show up as annoying errors in your logs. So what can you do to serve a favicon under that path too? -
4 ways to display something from your module nested within a page in Orchard Core - Orchard Core Nuggets
Development, Orchard Core Nuggets, Module, Widget, Liquid, Click to deploy, Update Content Workflow Task - This week in Orchard (17/04/2020)A common question during Orchard Core development, something that came up again recently, is how to display something within the context of an Orchard page when that piece of data comes from your module? How can you "inject" something into the Orchard layout when you want to display e.g. a list of products retrieved from an external API? There are a couple of ways to do this depending on what exactly you need. All are fairly straightforward so let's see a quick rundown!
-
How to debug an MSBuild build process when building Orchard Core - Orchard Core Nuggets
Orchard Core Nuggets, MSBuild, Click to deploy, Update Content Workflow Task - This week in Orchard (17/04/2020)Build processes of .NET Core apps like Orchard Core are getting quite complex nowadays, and the MSBuild build pipeline also commonly includes steps for building client-side resources or doing a lot of things out of the .NET world. What can you do if something goes off course with all those targets and props files and you're just scratching your head? How to figure out what happens during the build if you can only see that the results are incorrect?
-
How to publish an Orchard Core app - Orchard Core Nuggets
Orchard Core Nuggets, Publishing, Orchard Core, Click to deploy, Update Content Workflow Task - This week in Orchard (17/04/2020)Let's imagine you've already created an Orchard Core app and now it's time to show it to the world. How do you publish it, or rather, how do you create its publish package?
-
How to localize content items? - Orchard Core Nuggets
Localization, Orchard Core Nuggets, Culture picker on the Setup page, CodeMirror editor for TextField - This week in Orchard (28/03/2020), How to add a culture URL segment for localization in Orchard Core - Orchard NuggetsSo you want to create an Orchard Core website that presents its content in multiple languages. There are many parts of this, but what about content items? How do you make them ready for localization?
-
How to use Orchard Core without the sample themes? - Orchard Core Nuggets
Orchard Core Nuggets, Theme, Scoped Liquid TemplateContext, Template Azure Blob with Liquid - This week in Orchard (10/01/2020)Try to reference the
OrchardCore.Application.Cms.Core.Targets
NuGet package instead of theOrchardCore.Application.Cms.Targets
in your ASP.NET Core web application, that will only add the TheAdmin theme to your solution. -
How to use the same version of Orchard Core NuGet packages in every project across my solution? - Orchard Core Nuggets
Update, Orchard Core Nuggets, Theme, ModuleYou have your own ASP.NET Core project that using Orchard Core NuGet packages, but every time when you update them you have to do it one-by-one across the whole solution? Wouldn't it be easier to just update the package versions in one place? Then you may need to have a Directory.Build.targets file to define the versions!
-
Why is my content part not recognized in Orchard Core? - Orchard Core Nuggets
Orchard Core Nuggets, Content field, Content partYou have implemented your
MyAwesomePart
but you cannot attach it to your content type using the dashboard because it's not showing in the Content Parts list (Content -> Content Definition -> Content Parts)?
The most possible reason for this that you haven't registered your implementation in the service container. To register your class in the service container head to the Startup.cs file of your module and in theConfigureServices
method add the following line:services.AddSingleton<ContentPart, MyAwesomePart>();
But if you are using the RC1 version of Orchard Core or newer you can use theAddContentPart
extension method, where you just only need to provide your content part:services.AddContentPart<MyAwesomePart>();
. TheAddContentPart
and theAddContentField
(that you can use to register your fields) can be found in the OrchardCore.ContentManagement namespace.
Another recommendation is to use the Part suffix when naming your class or cs file that contains your custom part. Don't forget to put it in a Models folder to follow the recommendation of the MVC (model-view-controller) software design pattern.
For more information about registering your Part check out the Startup.cs file of our Orchard Core Training Demo module, where we registered thePersonPart
in the service container. We also mentioned the new way of registering ContentParts and ContentFields in this post of our This week in Orchard series.