Table of Contents

Interface IDnnContext

Namespace
ToSic.Sxc.Dnn.Run
Assembly
ToSic.Sxc.Dnn.Core.dll

Provides information about the current context within DNN. This only applies to 2sxc running inside DNN, not inside another platform.

This object is the root Dnn object, used mainly in older Razor. If possible, try to use CmsContext instead.

[PublicApi("This is DNN only, if possibly, try to use the hybrid CmsContext (v14) / MyContext (v16+) instead.")]
public interface IDnnContext

Remarks

It is currently on ToSic.Sxc.Run.IDnnContext but we plan to move it elsewhere

Properties

Module

The current DNN ModuleInfo - Dnn specific and with all the specials of the Dnn APIs.

If possible, try to use CmsContext.Module instead.

ModuleInfo Module { get; }

Property Value

ModuleInfo

Portal

The current DNN Portal Settings.

If possible, try to use CmsContext.Site instead.

PortalSettings Portal { get; }

Property Value

PortalSettings

Tab

The current DNN TabInfo (page). We also don't like the name Tab, but that's the DNN convention.

If possible, try to use CmsContext.Page instead.

TabInfo Tab { get; }

Property Value

TabInfo

User

The current DNN User.

If possible, try to use CmsContext.User instead.

UserInfo User { get; }

Property Value

UserInfo