Sorry for lame question but I am literally starting with DNN.
When you are in admin/design mode you can list all modules used, and when you click on module at the end you will see the list of controls used in this module with info about filename of the source.
The problem I have is in reverse -- I already know the filename with source, I would 开发者_如何学Clike to list all modules which use this control. How to do it?
If you want to find module definitions with a control, use a query like
SELECT *
FROM
ModuleDefinitions md
INNER JOIN ModuleControls mc on (mc.ModuleDefID = md.ModuleDefID)
WHERE ControlSrc like '%filename%'
If you want to find the modules that are actually used, you'll have to join with Tabs, TabModules and Modules tables. For example:
SELECT
t.PortalID
,t.TabID
,t.TabName
,m.ModuleID
,md.FriendlyName
,mc.ControlSrc
FROM
Tabs t
INNER JOIN TabModules tm ON t.TabID = tm.TabID
INNER JOIN Modules m on tm.ModuleID = m.ModuleID
INNER JOIN ModuleDefinitions md ON m.ModuleDefID = md.ModuleDefID
INNER JOIN ModuleControls mc on mc.ModuleDefID = md.ModuleDefID
WHERE ControlSrc like '%filename%'
精彩评论