Filter by data provider the items displayed on backend pages

When you have more than one provider for a module, you can choose which items to display in the backend pages of the module. You can do this by using QueryString parameters. When you select a provider, different than the default, a query string is added to the URL – for example, ../?provider=Testprovider

To display items from a specific provider, perform the following:

  1. Create a widget that uses the following code:
  2. Register the widget in the toolbox, using procedure Register a new widget in Sitefinity CMS toolbox.
  3. Click Administration » Backend pages and open for editing the pages where you want to filter the items displayed.
    For example, if you have a module, called MyModule, which has two data providers – Default and MyProvider, you can choose to display in the grid only items from MyProvider. Open for editing the backend page for MyModule.
  4. Drop the newly registered widget anywhere on the page and click its Edit button.
  5. In DefaultProvider field, enter the data provider whose items you want to display.
    It can be the Defualt(OpenAccessProvider) or any other you have created.
  6. Click Save.
    The widget appends the selected provider as a QueryString to the page.
  7. Hide the other providers from the backend page using CSS.
    Perform the following:
    1. Drag the CSS widget anywhere on the page and click its Edit button.
    2. For example, if you want the page to display the second provider and hide the other two, in the CSS widget, enter the following:

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

Libraries events