Skip to content

Repositories

Trevor Fayas edited this page Jan 2, 2022 · 2 revisions

General Purpose Repositories

  • IMediaRepository: Methods to retrieve Attachments (AttachmentItem) and Media Files (MediaItem) which include relative / absolute / permanent Urls.
  • IPageCategoryRepository: Methods to get the Node Categories of the given page or pages. By Pages is useful for items such as Blog or Article listings, where you want to get all the possible Categories to filter by.
  • IPageContextRepository: Non-Xperience version of the PageRetriever / IPageDataContextRetriever, gets the PageIdentity of either the current page (Page builder context) or the page by the DocumentID, DocumentGuid, NodeID, or NodeGuid
  • IRoleRepository: Helper methods for User Role management.
  • ISiteRepository: Non-Xperience version of the ISiteService to get the current site or the Sitename given the SiteID. Used in most repository building as well.
  • ISiteSettingsRepository: Any data retrieved through Xperience's Site Settings should have a method listed here to retrieve that data. You should add your own custom methods as you build in new Site Settings.
  • IUserRepository: Methods to get the Current User (based on the HttpContext.User.Identity.Name, "public" is default) or the user given their username, email, userID, or user Guid.
  • IUserWidgetProvider: This is implemented on the MVC site, and can be used on the editable areas tag helper to have full control over what widgets users should be able to see based on your own logic.
    • Example: <editable-area area-identifier="main" area-options-allowed-widgets="@await UserWidgetProvider.GetUserAllowedWidgetsAsync()" />

Feature Specific Repositories

Clone this wiki locally