News widget

Use this widget to display already created news.

PREREQUISITES: You have created at least one news item. For more information, see News.

After you have dragged the News widget on your page you must configure it to display selected news.

To do this, click Edit button in the upper-right corner of the widget.
The News window appears where you can configure the following:

Content

In content, you can choose which news of all the created news you want to display.
In Which news to display? radio button select one of the following:
  • All published news
    All created news are displayed.
  • One particular news item only...
    The system displays one news item.
    1. To select the news you want to display, click Select news button.
      A list of all news appears.
    2. Select the news item and click Done selecting.
  • Selection of news:
    You can narrow the displayed news, using categories, tags, and dates.
    Select one or more of the following:
    • by Categories…
      Click the Select button to select the categories from which you want to display news and click Done.
    • by Tags…
      Click Select button to select the tags, so that news tagged with those particular tags will be displayed and click Done.
    • by Dates…
      Click Select button.
      Select one of the predefined time intervals, so that news created during that interval will be displayed or choose Custom range… and use the From and To input fields to select a time interval. When finished click Done.

List Settings

On this tab you choose how to display the news you have selected.
  • If you select Use paging radio button, the system divides the news into pages.
    In the input field you specify how many news per page you want to display.
  • If you select Use limit radio button, the system displays only a limited number of the news you have chosen to display.
    In the input field, you specify how many news you want to display.
  • If you select No limit and paging radio button, the system displays all the news that you have selected in Content tab.
  • In Sort news dropdown box select a sorting criterion for the news.
  • In List template, select the template that is used to display the news on the webpage.
    You can create a custom template by clicking Create new template. You can edit existing templates by selecting them and clicking Edit.
    For more information, see Create and edit widget templates.

Single Item Settings

On this tab you choose the way to display the news.
In Open Single item in… radio button, select one of the following:
  • Auto-generated page
    When a news item is clicked it is displayed in a page which is automatically generated and has the same layout as the current page.
  • Select existing page…
    You select a page from the existing pages with certain layout where a news item will be displayed when clicked.

    NOTE: In order to display the news, the page you have selected must have the News widget added.

    1. Click Select page.
      From the treeview, select the page where you want to display the news.
    2. Click Done selecting.
  • In Detail templates, select the template which is used to display the news on the webpage.
    You can create a custom template by clicking Create New Template. You can edit existing templates by selecting them and clicking Edit.
    For more information, see Create and edit widget templates.

Filter and sort the news

You can filter and sort the news, which the widget displays, using both the default and the For developers: Custom fields of product types of the news.
  1. To filter or sort the news, click Advanced button in the lower-right corner of the window.
    The advanced editing mode opens.
  2. Click ControlDefinition » Views » NewsFrontendList buttons.
    • To filter the news, in FilterExpression input field, enter the desired filtering expression.
      You can use both default and custom fields. The field supports AND and OR Boolean operators.
      For example, enter Visible = true AND Status = Live
      For more information, see Filter expressions for content items.
    • To sort the news, in SortExpression input field, enter the desired sorting expression.
      You can use both default and custom fields. The field supports operators ASC for ascending and DESC for descending.
      For example, enter PublicationDate DESC

NOTE: To see all custom and default fields, perform procedure Create custom fields » Step 1 and Step 2.

For more information about advanced configuration options, see Advanced configuration of widgets.

When you are finished with all the settings, click Save.
The News window closes and the News widget is configured to display the news you have selected.

NOTE: If your site is multilingual and the page you are editing is synchronized with another translation, when you edit the widget, the Save to all translations button appears. If you click it, the current widget configuration will be saved to all translations, else, if you click Save, the widget configuration is saves only to the current translation, but the pages are still synchronized. If your pages are synchronized, you can have different widget configurations, but you cannot have different widgets.

Additional resources

ARTICLES

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

Video widget