SunBlogNuke Team Blog

Share you with any news or development process about our dnn modules, such as status or release notes.

First time here? You may want to check out the blog archives, subscribe to the RSS feed, sign up for free email updates, or follow me on Twitter. Thanks for visiting!

From monthly archives: May 2014

We are pleased to present below all posts archived in 'May 2014'. If you still can't find what you are looking for, try using the search box.

DNN Tips: GetTab Method without DNN Context

As you know, the simple method GetTab(int tabid) was obsolete and has been replaced by GetTab(ByVal TabId As Integer, ByVal PortalId As Integer, ByVal ignoreCache As Boolean). If you want to call the new method, we have to pass the additional parameter “PortalId”.

In common,  the object PortalSettings can be easy to get with DNN context, such as special dnn module & page; however, it may be inaccessible in some sceneries, such as separate aspx page or handler. Then is there any way to get the correct tab info with this new method? Now there is a simple trick to do it with passing into Null.NullInteger as the parameter PortalId. So the coding looks like that:

var tabController = new TabController();
var blogPage = tabController.GetTab(tabID, Null.NullInteger, false);

Deeping into the source code, you will find out that it always tries to get the correct PortalId for this tab/page object:

//if we do not know the PortalId then try to find it in the Portals Dictionary using the TabId
portalId = GetPortalId(tabId, portalId);

//if we have the PortalId then try to get the TabInfo object
tab = GetTabsByPortal(portalId).WithTabId(tabId) ??
        GetTabsByPortal(GetPortalId(tabId, Null.NullInteger)).WithTabId(tabId);

Hope this trick & tip helps if someone has the same issue.

DNN7 Blog Integrated with ModuleSearchBase

Recently we are building a totally new branch of #DNN #Blog #Module – SunBlogNuke based on DNN 7.1 core framework. As you know, DNN7 indeed introduced lots of awesome features, including advanced url rewrite solution. There are more topic about DNN7, however, we just share some interesting things about new class "ModuleSearchBase".

Read the rest of entry »

Copyright © 2009-2024 Ultimate DNN Blog Module - SunBlogNuke Powered by SunBlogNuke Corp