Portal Tokens
[[Portal:property]] returns a setting of the current DNN portal. Use it to drop the site's name, contact email, or logo into your views and forms, or to pass the portal ID into SQL when you have multiple portals sharing tables.
Syntax
[[Portal:property]]Properties
| Token | Returns |
|---|---|
[[Portal:ID]] | Numeric DNN PortalID for the current portal |
[[Portal:Name]] | The portal's display name |
[[Portal:Description]] | The portal's description from Site Settings (since v1.4) |
[[Portal:Email]] | The portal's primary contact email |
[[Portal:Alias]] | The active domain alias for the portal (since v1.4) |
[[Portal:LogoFile]] | Filename of the portal logo |
[[Portal:HomeDirectory]] | Web-relative path to the portal's home directory |
[[Portal:HomeDirectoryMapped]] | File-system path to the portal's home directory |
[[Portal:HomeTabId]] | Page (TabID) of the portal's home page |
[[Portal:LoginTabId]] | Page (TabID) of the portal's custom login page (since v1.4) |
[[Portal:Expiry]] | Portal expiration date. Returns 12:00:00 AM when no expiration is set (since v1.4) |
[[Portal:TimeZoneOffset]] | Offset from GMT in minutes. May be positive or negative (since v1.4) |
Example
html
<xmod:Template>
<HeaderTemplate>
<h1>Welcome to [[Portal:Name]]</h1>
<p>Questions? <a href="mailto:[[Portal:Email]]">Contact us</a>.</p>
<img src="[[Portal:HomeDirectory]][[Portal:LogoFile]]" alt="[[Portal:Name]]" />
</HeaderTemplate>
<ListDataSource CommandText="SELECT * FROM Articles WHERE PortalId = @pid">
<Parameter Name="pid" Value="[[Portal:ID]]" DataType="Int32" />
</ListDataSource>
...
</xmod:Template>See the Tokens Overview for the standard rules that apply to all tokens.