how to identify custom widgets that are not being used in the community?

Hi 

Has anyone known how to get a list of the custom widgets that are not being used in the community?


Thanks,

Igor

  • There's not currently a way to do this, other than manually checking each widget in the widget replacement UI to see if any usages appear.

  • Hmm, if you have database access, you could check the list of widget IDs against the table cs_ConfiguredContentFragments and te_ContentFragmentContainer_ConfiguredContentFragments.

    This finds all instances of the widgets you specify..

    SELECT * FROM te_ContentFragmentContainer_ConfiguredContentFragments WHERE type IN (
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')

    So when you're looking for the absence of the ID in the Type column it starts to get a bit messy, but this SQL does the job and doesn't need any temporary tables..

    SELECT widgetid FROM (VALUES 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')) 
    	x(widgetid)
    WHERE widgetid NOT IN (
    	SELECT Type FROM te_ContentFragmentContainer_ConfiguredContentFragments WHERE type IN (
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')
    ) AND widgetid NOT IN (
    	SELECT Type FROM cs_ConfiguredContentFragments WHERE type IN (
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')
    )

    You'd need to get a list of your custom widgets from somewhere. I got my list from the file system & copied the names out into Notepad++ to massage them into the SQL above.

    Since I'm relatively new to this, I'm maybe missing something.. but hopefully this is a good starting point.