Setting the appearance of the news system
This user guide will help you to set the appearance of news, structure news by categories and the date, set up a search for news and a news archive.
Setting appearance of news
Top news
You can highlight important news separately using the Top News function:
First activate the corresponding checkbox in the article.
Then you can filter these articles in the content element: In the Plugin – Settings tab there is a Top News field to display either only the top news or except top news.
This allows you to create two separate list views: One displays the top news, the second displays the rest. Make sure that for the second list view, under Plugin – Additional, the checkbox for Exclude already displayed news is selected to avoid duplicate displays.
Alternatively, there is also an option under Plugin – Additional to display top news above. You will then get by with a list view in which the top news items are always displayed first.
Number of news in list and pagination
The Max records displayed field defines the number of news that appear in the list.
You can also display these news page by page if you fill in the Items per Page field. Make sure that both numbers are multiples of 6, for example, a maximum of 24 articles and 6 entries per page. This is because the news items are displayed in three columns in the desktop view and in two columns in the tablet view, and this way you avoid empty fields.
Note
If there are multiple news lists on a page, you need to hide pagination under Plugin – Additional. Two paginations cannot be displayed on one page at the same time, because they influence each other.
Date
There are 3 different variants for the date display:
- date in bar
- inline date over image
- without date
You can find the settings for the date display in your content element in the Plugin – Layout tab: Layout of Date.
Creating and assigning news categories
To structure your news system in terms of content, you can create news categories:
- Switch to the module List. Create a new content element News Category and assign any name.
- Now the news category can be assigned to a news article. To do this, switch to the Options tab when creating or editing a news article and select the desired category.
- In order for the allocation to also take effect in the list, you still need to select the news category in the list view element in the plug-in settings in the Additional tab as well. This selection acts like a filter that restricts the articles in the list view to the selected categories.
- To show the category in the list view below the teaser text, check the Show categories checkbox in the Layout tab of the plug-in settings.
- To display the category in the detail view as well, edit the detail view in the same way as the list view by also activating the corresponding checkbox in the Layout tab.
Creating a list of news categories
With the news category list, users can display news by category.
As with the search view, the plug-in is also required twice here: Once as a news category list and once as a list view.
Note that in the news categories list, in the Additional tab, you specify the page to which the category filter should be applied.
In the Additional tab you can select those categories that appear in the drop-down menu. If the News categories field remains empty, all entries will be displayed.
Creating news search
To search news in the frontend, you need 2 variants of the news system plug-in: Search form and Search result.
In the Search form element, in the Additional tab, specify the target page where the Search result element is located.
Configure the Search result element in the same way as the List view.
Creating date menu for news
You can use the date menu to list news by month. For the useful application of the date menu, place the plug-in on a page twice: for the overview of the months, that have news and for listing the news of the selected month.
You can also position the two plug-ins on different pages – in this case, the page with the list display must be entered in the PageId for list display field in the Additional tab. When the page is called up, the monthly list with the news in the respective month is called up first. By clicking, the posts of the selected month are filtered in the list.
For the date menu, the same information must be entered in the Settings tab as for the list display. The Date field to be used must remain empty or be set to Specified date/time.
The settings in the Layout tab have no effect in the Date menu.
Creating news archive
To keep your news list as up-to-date as possible, you can automatically archive older news and hide them from the current news list.
This requires 3 steps:
- In the list view, select Only active (not archived) in the Archive drop-down.
- Enter a date for archiving in the news article. When the entered date is reached, the item will be moved to the archive.
- Create an additional archive page with a second list view where the option Archived is selected under Archive. TYPO3 then shows the entries in the normal list view which archive date has not yet passed and on the new archive page the expired news.