TabInfo IconFile


I'm wondering how to correctly use the IconFile property of a TabInfo object in DotNetNuke? I am building a custom overlay menu that will be displaying the tab name, description, and an icon similar to the Admin and Host pages that use the 'console' DesktopModule. If I have a TabInfo object that has an IconFile set for it the value of the IconFile field is something like 'FileID=83'. I'm assuming this needs to be run through some sort of File API to determine what the URL of the file is.

Best Solution

The IconFile property of the TabInfo object returns the filename of the image associated with that TabInfo. This filename source is relative to the Portal root directory and therefor simply needs to be prefaced with PortalSettings.HomeDirectory to get the image source relative to the site root.

<img src="<%=PortalSettings.HomeDirectory %><%#Eval("IconFileLarge") %>" 
width="124" height="88" alt="" />
Related Question