About

This skin shows you some of the DNN Framework data you can use in your skins (just like you can use <%=SkinPath%>)
The part between <%= and %> will be replaced dynamically by the Framework.
Everything in Blue is the dynamic result of the Token mentioned on the previous line
These are supposed to be used in ASCX skins.

If you have any remarks or questions, please let me know.

2010-10-11, Timo Breumelhof

Portal Attributes

Portal URL / Alias = PortalSettings.PortalAlias.HTTPAlias
www.mac-sports.com
Portal ID = PortalSettings.PortalAlias.PortalID
20
Portal Description = PortalSettings.Description
Portal Namen = PortalSettings.PortalName
MAC
Portal Admin Email address = PortalSettings.Email
MACSports1946@gmail.com
Portal home folder = PortalSettings.HomeDirectory
/Portals/20/
Portal Logo File = PortalSettings.LogoFile
Link to Home page = NavigateUrl(PortalSettings.HomeTabId)
http://www.mac-sports.com/Home.aspx
Link to Splash page = NavigateURL(PortalSettings.SplashTabId)
~/Default.aspx?tabid=1436
Link to Host page = NavigateURL(PortalSettings.SuperTabId)
http://www.mac-sports.com/Host.aspx
Link to Admin page = NavigateURL(PortalSettings.AdminTabId)
http://www.mac-sports.com/Admin.aspx

Usage Examples

Show the logo of this portal
logo
Logo as background image
Show the Portal Admins Email address
Show link to the Home page

Page Attributes

Page Description = PortalSettings.ActiveTab.Description
championshipfootball.pgn
Page Link = PortalSettings.ActiveTab.FullUrl
http://www.mac-sports.com/ResultsStats/iStats.aspx
Page Name = PortalSettings.ActiveTab.TabName
iStats
Page Path = PortalSettings.ActiveTab.TabPath
//ResultsStats//iStats
Page Title = PortalSettings.ActiveTab.Title
iStats
Page Keywords = PortalSettings.ActiveTab.KeyWords
iStats
Page TabId = PortalSettings.ActiveTab.TabID
1436
Page Level = PortalSettings.ActiveTab.Level
1
Page Icon = PortalSettings.ActiveTab.IconFile

Breadcrumbs

PortalSettings.ActiveTab.BreadCrumbs(x) returns the page info (TabInfo) on level x.
The problem is that if you ask for a non exisiting page you get an error, so you need an extra check
Root page Name = If PortalSettings.ActiveTab.Level > (0) Then Response.Write(PortalSettings.ActiveTab.BreadCrumbs(0).TabName)
Results/Stats

Usage Examples

iStats

Security

Is the visitor logged in? = IIf(Request.IsAuthenticated, "LoggedIn", "NotLoggedIn")
NotLoggedIn

User

Currently logged in User = UserController.GetCurrentUserInfo().Username
User Display Name = UserController.GetCurrentUserInfo().Displayname
User Creation Date = UserController.GetCurrentUserInfo().CreatedOnDate
1/1/0001 12:00:00 AM
User Email = UserController.GetCurrentUserInfo().Email
User Display FirstName = UserController.GetCurrentUserInfo().FirstName
User Display LastName = UserController.GetCurrentUserInfo().LastName
User Id = UserController.GetCurrentUserInfo().UserID
-1

Skin and Container

Page skin (full path) = PortalSettings.ActiveTab.SkinSrc
/Portals/20/Skins/40FINGERS_DnnAttributes/Simple.ascx
Page container (full path) = PortalSettings.ActiveTab.ContainerSrc
/Portals/_default/Containers/MinimalExtropy/Title_Grey.ascx