PortalInfo provides a base class for Portal information
This class inherites from the BaseEntityInfo and is Hydratable
Namespace: DotNetNuke.Entities.PortalsAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
[SerializableAttribute] [XmlRootAttribute("settings", IsNullable = false)] public class PortalInfo : BaseEntityInfo, IHydratable |
Visual Basic |
---|
<SerializableAttribute> <XmlRootAttribute("settings", IsNullable := false)> Public Class PortalInfo Inherits BaseEntityInfo Implements IHydratable |
Remarks
Examples
This example shows how the PortalInfo class is used to get physical file names
![]() | |
---|---|
Public ReadOnly Property PhysicalPath() As String Get Dim _PhysicalPath As String Dim PortalSettings As PortalSettings = Nothing If Not HttpContext.Current Is Nothing Then PortalSettings = PortalController.Instance.GetCurrentPortalSettings() End If If PortalId = Null.NullInteger Then _PhysicalPath = DotNetNuke.Common.Globals.HostMapPath + RelativePath Else If PortalSettings Is Nothing OrElse PortalSettings.PortalId <> PortalId Then ' Get the PortalInfo based on the Portalid Dim objPortals As New PortalController() Dim objPortal As PortalInfo = objPortals.GetPortal(PortalId) _PhysicalPath = objPortal.HomeDirectoryMapPath + RelativePath Else _PhysicalPath = PortalSettings.HomeDirectoryMapPath + RelativePath End If End If Return _PhysicalPath.Replace("/", "\") End Get End Property |
Inheritance Hierarchy
System..::..Object
DotNetNuke.Entities..::..BaseEntityInfo
DotNetNuke.Entities.Portals..::..PortalInfo
DotNetNuke.Entities..::..BaseEntityInfo
DotNetNuke.Entities.Portals..::..PortalInfo