C# Class Sdl.Web.Tridion.Mapping.DefaultContentProvider

Default Content Provider implementation (DD4T-based).
Inheritance: IContentProvider, IRawDataProvider
Afficher le fichier Open project: sdl/dxa-web-application-dotnet

Private Properties

Свойство Type Description
GetPageModel Sdl.Web.Common.Models.PageModel
PopulateDynamicList Sdl.Web.Common.Models.DynamicList

Méthodes publiques

Méthode Description
GetEntityModel ( string id, Sdl.Web.Common.Configuration.Localization localization ) : EntityModel

Gets an Entity Model for a given Entity Identifier.

Since we can't obtain CT metadata for DCPs, we obtain the View Name from the CT Title.

GetPageContent ( string urlPath, Sdl.Web.Common.Configuration.Localization localization ) : string
GetPageModel ( string urlPath, Sdl.Web.Common.Configuration.Localization localization, bool addIncludes ) : PageModel

Gets a Page Model for a given URL.

GetStaticContentItem ( string urlPath, Sdl.Web.Common.Configuration.Localization localization ) : Sdl.Web.Common.Models.StaticContentItem

Gets a Static Content Item for a given URL path.

PopulateDynamicList ( DynamicList dynamicList, Sdl.Web.Common.Configuration.Localization localization ) : void

Populates a Dynamic List by executing the query it specifies.

Méthodes protégées

Méthode Description
GetCmUrl ( string urlPath ) : string

Converts a request URL path into a CMS URL (for example adding default page name and file extension)

GetIncludesFromModel ( DD4T.ContentModel.IPage page, Sdl.Web.Common.Configuration.Localization localization ) : IEnumerable
GetPage ( string urlPath, Sdl.Web.Common.Configuration.Localization localization ) : DD4T.ContentModel.IPage

Private Methods

Méthode Description
GetPageModel ( string urlPath, bool addIncludes = true ) : PageModel
PopulateDynamicList ( DynamicList dynamicList ) : DynamicList

Method Details

GetCmUrl() protected méthode

Converts a request URL path into a CMS URL (for example adding default page name and file extension)
protected GetCmUrl ( string urlPath ) : string
urlPath string The request URL path (unescaped)
Résultat string

GetEntityModel() public méthode

Gets an Entity Model for a given Entity Identifier.
Since we can't obtain CT metadata for DCPs, we obtain the View Name from the CT Title.
If no Entity Model exists for the given URL.
public GetEntityModel ( string id, Sdl.Web.Common.Configuration.Localization localization ) : EntityModel
id string The Entity Identifier in format ComponentID-TemplateID.
localization Sdl.Web.Common.Configuration.Localization The context Localization.
Résultat Sdl.Web.Common.Models.EntityModel

GetIncludesFromModel() protected méthode

protected GetIncludesFromModel ( DD4T.ContentModel.IPage page, Sdl.Web.Common.Configuration.Localization localization ) : IEnumerable
page DD4T.ContentModel.IPage
localization Sdl.Web.Common.Configuration.Localization
Résultat IEnumerable

GetPage() protected méthode

protected GetPage ( string urlPath, Sdl.Web.Common.Configuration.Localization localization ) : DD4T.ContentModel.IPage
urlPath string
localization Sdl.Web.Common.Configuration.Localization
Résultat DD4T.ContentModel.IPage

GetPageContent() public méthode

public GetPageContent ( string urlPath, Sdl.Web.Common.Configuration.Localization localization ) : string
urlPath string
localization Sdl.Web.Common.Configuration.Localization
Résultat string

GetPageModel() public méthode

Gets a Page Model for a given URL.
If no Page Model exists for the given URL.
public GetPageModel ( string urlPath, Sdl.Web.Common.Configuration.Localization localization, bool addIncludes ) : PageModel
urlPath string The URL path (unescaped).
localization Sdl.Web.Common.Configuration.Localization The context Localization.
addIncludes bool Indicates whether include Pages should be expanded.
Résultat Sdl.Web.Common.Models.PageModel

GetStaticContentItem() public méthode

Gets a Static Content Item for a given URL path.
public GetStaticContentItem ( string urlPath, Sdl.Web.Common.Configuration.Localization localization ) : Sdl.Web.Common.Models.StaticContentItem
urlPath string The URL path (unescaped).
localization Sdl.Web.Common.Configuration.Localization The context Localization.
Résultat Sdl.Web.Common.Models.StaticContentItem

PopulateDynamicList() public méthode

Populates a Dynamic List by executing the query it specifies.
public PopulateDynamicList ( DynamicList dynamicList, Sdl.Web.Common.Configuration.Localization localization ) : void
dynamicList Sdl.Web.Common.Models.DynamicList The Dynamic List which specifies the query and is to be populated.
localization Sdl.Web.Common.Configuration.Localization The context Localization.
Résultat void