Register  Login  
  May 18, 2012  
Search_Blog Minimize
Print  

Blog_Archive Minimize
Print  

Blog    
View_Blog Minimize
Jun 7

Written by: host
Sunday, June 07, 2009 9:26 AM 

Ever needed to locate every page (tab in DNN old speak) where a module is used?  This is often needed when updating a site and want to confirm that each use of the module converted properly.

So use this query:

SELECT   t.taborder,
         t.tabid,
         t2.tabname AS [Parent Tabname],
         t.tabname,
         m.moduleid,
         m.moduletitle
FROM     dbo.tabs t
         JOIN tabmodules tm
           ON t.tabid = tm.tabid
         JOIN dbo.modules m
           ON tm.moduleid = m.moduleid
         JOIN dbo.moduledefinitions md
           ON m.moduledefid = md.moduledefid
         JOIN dbo.desktopmodules dm
           ON md.desktopmoduleid = dm.desktopmoduleid
         LEFT OUTER JOIN tabs t2
           ON t.parentid = t2.tabid
WHERE    dm.friendlyname = "TMinus"
         AND t.portalid = 2
         AND m.isdeleted = 0
         AND dm.isadmin = 0
ORDER BY t.taborder

As you can see I have explicitly defined the friendlyname of the module -- in this case "TMinus" 

This query return the parent and page where the module exists -- in this case I have one on the Home Page and 4 examples under the Free Modules>T-Minus V3.1 page  

NOTE:  Prior to V3 of DNN, Pages were referred to as Tabs -- the change in terminology never made it to the database -- rather huge job to convert the names.  So where you see Tab -- think page.

Hope this helps
Paul.

Tags:

Blog_List Maximize
Print  

  Home | Blog | Forum | Subscriptions | Free Modules | Videos   Page generated in 0.1096466 seconds.
  Copyright 2010 by TressleWorks   Terms Of Use | Privacy Statement