Created
February 4, 2026 19:29
-
-
Save AaronSadlerUK/f2bb83ccaf0b23840f6c06b45e536de1 to your computer and use it in GitHub Desktop.
Find Umbraco Macro usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Find PUBLISHED content with macros in Umbraco 13 | |
| SELECT DISTINCT | |
| n.text AS 'Content Name', | |
| n.id AS 'Node ID', | |
| pt.Alias AS 'Property Alias', | |
| SUBSTRING(pd.textValue, 1, 500) AS 'Preview' | |
| FROM umbracoPropertyData pd | |
| INNER JOIN umbracoContentVersion cv ON pd.versionId = cv.id | |
| INNER JOIN umbracoDocumentVersion dv ON cv.id = dv.id AND dv.published = 1 | |
| INNER JOIN umbracoNode n ON cv.nodeId = n.id | |
| INNER JOIN cmsPropertyType pt ON pd.propertyTypeId = pt.id | |
| WHERE pd.textValue LIKE '%<?UMBRACO_MACRO%' | |
| OR pd.textValue LIKE '%umb://macro/%' | |
| OR pd.textValue LIKE '%"macroAlias"%' | |
| ORDER BY n.text; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment