Lombiq Helpful Libraries - Orchard Core Libraries - MVC for Orchard Core
June 14, 2024 ยท View on GitHub
Extensions and helpers
HttpContextExtensions: Adds extension methods likeIsAdminUrl()toHttpContextobjects.OrchardControllerExtensions: Adds extension methods likeRedirectToContentDisplay(content)toControllerobjects.ResultExecutingContextExtensions: contains shortcuts for common context operations inIAsyncResultFilters.ShapeResultExtensions: Adds extensions methods generating placement strings on your shape description, such asUseTab().UpdateModelExtensions: Adds extension methods for working with theIUpdateModelsuch asGetModelErrors().UrlHelperExtensions: Adds extension methods to the@Urlhelper, such asEditContentItemWithTab().
TypedRoute
This class provides a strongly typed way to generate local URLs for Orchard Core MVC actions. It uses lambda expressions to select the action and provide arguments. Use TypedRoute.CreateFromExpression<TClass>(...).ToString() or the provided OrchardHelper.Action() and HttpContext.Action() extensions.
Check out the Lombiq.HelpfulLibraries.Samples project for examples and a video demo here.
If you also use our UI Testing Toolbox, you can use the UITestContext.GoTo() extension method from there, as well.
WidgetFilterBase<T>
A base class for creating filters that insert a content as widget in a specified zone with permission check.