Blog posts widget
Use this widget to display already created blog posts.
PREREQUISITES: You have created at least one blog with at least one post in it. For more information, see Blogs and blog posts.
After you have dragged the Blog posts widget on your page, the widget automatically displays all published blog posts.
To configure the display of the posts, perform the following:
Click Edit button in the upper-right corner of the widget.
The Blogs window appears where you can configure the following:
In content, you can choose the blogs whose posts you want to display.
NOTE: If you are using multiple site management and the Blogs module uses data sources from more than one site, you must first choose the source from which you want to display blogs.
For more information, see Multisite: Manage multiple sites.
In Which blog posts to display? radio button select one of the following:
- From all blogs
All posts from all blogs are displayed.
- From selected blogs only…
The system displays posts only from the selected blog.
Under Narrow selection you can further specify which posts to display by choosing one of the following:
- To select the blog, click Select a blog button.
A list of all created blogs appears.
- Select the blog and click Done selecting.
- All published posts from selected blogs
This is selected by default and displays all posts from the blogs selected in the previous step.
- Selection of posts:
You can narrow the displayed posts, 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 posts and click Done.
- by Tags…
Click Select button to select the tags, so that posts 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 posts 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.
For more information, see Blogs and blog posts.
On this tab you choose how to display the posts you have selected.
If you select Use paging radio button, the system divides the posts into pages.
In the input field you specify how many posts per page you want to display.
If you select Use limit radio button, the system displays only a limited number of the posts you have chosen to display.
In the input field, you specify how many posts you want to display.
If you select No limit and paging radio button, the system displays all the posts that you have selected in Content tab.
In Sort blog posts dropdown box, select a sorting criterion for the posts.
- In List template, select the template which is used to display the posts 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 a post when clicked.
In Open Single item in… radio button, select one of the following:
Filtering and sorting blog posts
You can filter and sort the blog posts, which the widget displays, using both the default and the For developers: Custom fields of product types of the posts.
- To filter or sort the posts, click Advanced button in the lower-right corner of the window.
The advanced editing mode opens.
- Click ControlDefinition » Views » MasterBlogPostsFrontend buttons.
- To filter the posts, 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 posts, 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 Blogs window closes and the Blog posts widget is configured to display the posts 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.