Lombiq Helpful Libraries - Orchard Core Libraries - Contents for Orchard Core

December 26, 2023 ยท View on GitHub

Constants

  • CommonContentDisplayTypes: Has constants for values that can be used with IContentItemDisplayManager.BuildDisplayAsync() or OrchardRazorHelperExtensions.DisplayAsync() to safely select the correct display type.
  • CommonStereotypes: Constants for commonly used content stereotypes.

Extensions

  • ContentDefinitionManagerExtensions: Adds extension methods to easily fetch settings objects from ContentTypePartDefinition objects.
  • ContentEnumerableExtensions: Adds an extension for selecting parts in a collection of contents.
  • ContentExtensions: Adds ContentItem manipulating extension methods to IContent objects, including the same ones that are available for the ContentItem objects (e.g. As<T>() or Weld<T>()).
  • ContentFieldEditorEnums: Adds enums with the name of ContentField editors.
  • ContentHttpContextExtensions: Adds IContent session related extension methods to HttpContext.
  • ContentOrchardHelperExtensions: Extensions for managing content items better via IOrchardHelper.
  • ContentManagerExtensions: Adds extension methods for retrieving, loading or creating content using the IContentManager interface.
  • ContentManagerSessionExtensions: Uses the IContentManagerSession scoped cache around any ContentItem query done outside IContentManager.
  • ContentTypeDefinitionBuilderExtensions: Adds extension methods for configuring the content type definition via ContentTypeDefinitionBuilder.
  • ContentPartDefinitionBuilderExtensions: Adds extension methods for configuring the content part definition via ContentPartDefinitionBuilder.
  • ContentVersionNumberServiceExtensions: Adds extension methods for retrieving IContent version numbers to IContentVersionNumberService.
  • IdStringExtensions: Adds extension methods relating to content item ID generation.

Helpers

  • ContentExceptionHelpers: Using these helpers, arguments can be tested without writing if statements, for example to check if the ContentItem has the given part attached to it.

Services

  • IContentVersionNumberService: Service for getting content version number based on how many different versions of it are in the document database. It has a method for getting the version number of the latest version (GetLatestVersionNumberAsync()) and another one for a specific content version ID (GetCurrentVersionNumberAsync()).
  • ITaxonomyHelper: Taxonomy-related helper methods.