Ektron List All PageBuilder Pages

| | | |
SET NOCOUNT ON

DECLARE @Domain VARCHAR(50)

SET @Domain = '/'

SELECT c.[content_id],
	c.[content_title],
	c.[content_html],
	CASE
		WHEN c.[content_status] = 'A'
			THEN 'Approved'
		WHEN c.[content_status] = 'O'
			THEN 'Checked Out'
		WHEN c.[content_status] = 'I'
			THEN 'Checked In'
		WHEN c.[content_status] = 'S'
			THEN 'Submitted for Approval'
		WHEN c.[content_status] = 'M'
			THEN 'Marked for Deletion'
		WHEN c.[content_status] = 'P'
			THEN 'Pending Go Live Date'
		WHEN c.[content_status] = 'T'
			THEN 'Awaiting Completion of Associated Tasks'
		WHEN c.[content_status] = 'D'
			THEN 'Pending Deletion'
		END AS ContentStatus,
	c.[date_created],
	c.[approval_method],
	c.[searchable],
	cft.[folder_name],
	cft.FolderPath,
	(@Domain + uam.[urlaliasnm]) AS AliasURL,
	(@Domain + uam.[urltargetnm]) AS ActualURL
FROM [content] c
INNER JOIN [content_folder_tbl] cft ON c.folder_id = cft.folder_id
INNER JOIN [UrlAliasMapping] uam ON uam.TargetID = c.content_id
WHERE content_html LIKE '<PageData%'
	AND content_html LIKE '%dynamic%' -- name/type of widget or something else
ORDER BY cft.FolderPath,
	content_title
Originally Posted on January 5, 2015
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.