Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created January 20, 2026 12:08
Show Gist options
  • Select an option

  • Save sitefinitySDK/7afeb351b026f8959822d642e281c7e0 to your computer and use it in GitHub Desktop.

Select an option

Save sitefinitySDK/7afeb351b026f8959822d642e281c7e0 to your computer and use it in GitHub Desktop.
'use client';
import { WidgetMetadata } from '@progress/sitefinity-nextjs-sdk';
import { GetWidgetsArgs } from '@progress/sitefinity-nextjs-sdk';
export async function myCustomFiltering(widgetMetadata: WidgetMetadata, args: GetWidgetsArgs): Promise<boolean> {
// Your filtering logic here
// Return true to show the widget, false to hide it
// Example: Hide a specific widget based on its name
if (widgetMetadata.designerMetadata?.Name === 'MyCustomWidget') {
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment