Table of Contents
These v19 docs are archived 🔒. Go to the latest docs home or try if this exact page is available in the latest docs.

Class Pages

Namespace
ToSic.Sxc.DataSources
Assembly
ToSic.Sxc.dll

Get a list of pages from the current platform (Dnn or Oqtane).

[PublicApi]
[VisualQuery(ConfigurationType = "3d970d2b-32cb-4ecb-aeaf-c49fbcc678a5", NameId = "e35031b2-3e99-41fe-a5ac-b79f447d5800", HelpLink = "https://go.2sxc.org/ds-pages", Icon = "find_in_page", NiceName = "Pages", Type = DataSourceType.Source, UiHint = "Pages in this site")]
public class Pages : CustomDataSourceAdvanced, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable
Inheritance
object
ServiceBase
Pages
Implements
Inherited Members

Remarks

You can cast the result to IPageModel for typed use in your code. To figure out the returned properties, best also consult the IPageModel.

History

  • Created ca. v.16 early 2023 but not officially communicated
  • Models IUserModel and IUserRoleModel created in v19.01 and officially released

Properties

IncludeAdmin

Include admin pages such as site files. Default is false

[Configuration]
public bool IncludeAdmin { get; }

Property Value

bool

Remarks

IncludeDeleted

Include deleted pages in the recycle bin. Default is false

[Configuration]
public bool IncludeDeleted { get; }

Property Value

bool

Remarks

IncludeHidden

Include hidden pages. Default is false

[Configuration]
public bool IncludeHidden { get; }

Property Value

bool

Remarks

Include link-reference pages (which are usually used in menus, and not themselves a real page). Default is true

[Configuration]
public bool IncludeLinks { get; }

Property Value

bool

IncludeSystem

Include system pages such as modules management. Default is false

[Configuration]
public bool IncludeSystem { get; }

Property Value

bool

Remarks

RequireEditPermissions

Require that the current user has edit permissions on all pages. Default is false

[Configuration]
public bool RequireEditPermissions { get; }

Property Value

bool

Remarks

RequireViewPermissions

Require that the current user has view permissions on all pages. Default is true

[Configuration]
public bool RequireViewPermissions { get; }

Property Value

bool

Remarks