Created
January 20, 2026 12:08
-
-
Save sitefinitySDK/7afeb351b026f8959822d642e281c7e0 to your computer and use it in GitHub Desktop.
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
| '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