Skip to content

Instantly share code, notes, and snippets.

@adamzuckerman
Created February 20, 2016 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamzuckerman/ce12a9f1de9b18b35940 to your computer and use it in GitHub Desktop.
Save adamzuckerman/ce12a9f1de9b18b35940 to your computer and use it in GitHub Desktop.
Find the pages on DNN where a module has been used
SELECT TabID, REPLACE(HTTPAlias + TabPath, '//', '/') AS ThePage
FROM Tabs
INNER JOIN PortalAlias
ON Tabs.PortalID = PortalAlias.PortalID
AND PortalAliasID = (
SELECT MIN(pa.PortalAliasID)
FROM PortalAlias AS pa
WHERE Tabs.PortalID = pa.PortalID
)
WHERE TabID IN (SELECT TabID FROM TabModules WHERE ModuleID IN ( 0 ))
;
@adamzuckerman
Copy link
Author

Purpose

The purpose of this query is to create a list of all of the webpages on which the specified modules are included.

Usage

  • Determine which modules (by ID) you require.
  • Replace the 0 on line 10 with a comma separated list of module IDs.
  • Execute the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment