So I would like to make some custom web forms that will live in my dnn website, but I'd like them to have access to information about the current DNN portal - in other words have access to the PortalSettings class.
I noticed that the SiteMap.aspx web form gets this information by inheriting from the DotNetNuke.Framework.PageBase, which gives the page some more properties, such as PortalSettings. So I went ahead and subclassed from PageBase. Unfortunately, execution doesn't even make it to the Page_Load method of my page because an exception is thrown in Localization.GetEnabledLocales() when it tries to get the PortalSettings - PortalsSettings is null and thus I get a null exception...
As far as I can tell, I'm inheriting PageBase just as SiteMap.aspx does, and I don't see that SiteMap.aspx is doing anything special to make PortalSettings exist. What is so magical abot SiteMap.aspx that allows it to use PageBase like it does?
Here's what my code behind looks like:
namespace Kemmis.DNN.Examples
{
public partial class GetTabs : DotNetNuke.Framework.PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
//...
}
}
}
And here is what my aspx looks like:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetTabs.aspx.cs" Inherits="Kemmis.DNN.Examples.GetTabs" %>
Any ideas?