Filter News To Display In A Content Well Portlet
The Biochemistry and Biophysics web site uses collections to highlight specific categories of news (Faculty News, Student News, and Postdoc & Scholars News).
Here's how you would implement this:
Create the News items
- Add multiple News items to your site.
- Ensure each one has a Title, Summary information and an Image.
- Add an appropriate tag to each News item. For example, all of the news that you want to display in the Faculty News portlet should be tagged with something like faculty news, faculty_news, or news-faculty. You can use whatever naming convention you choose. Just ensure that you don't have multiple variations of the same thing. For example, you wouldn't want to use all three faculty news tags (faculty news, faculty_news, and news-faculty). Pick one and stick with it.
Create the Collection
- Navigate to the place in your site where you want to add the collection.
- Click on the Add new... button on the green bar and select Collection.
- Give the collection a name (for example, Faculty News).
- Add a Search Term set to Tag and check the corresponding tag under the Select drop-down menu (for example news_faculty). The preview box will show you how many items match your search terms.
- It is recommended that you add a second search term with Review state set to Published. This will prevent private content from displaying in the collection results.
- Sort on the Effective date.
- Check the Reversed order option so that the most recent News articles will display first.
- Click the Save button.
- Publish the collection
- If you don't want the collection to display in the navigation (which is most often the case), you can exclude it.
Display the Collections in the content well
- On the page where you want to display the News, click the link of the portlet area that you want to add the portlets to (for example, the 'Add, edit or remove a portlet below the content' link)
- To create a 3-column display like Biochemistry and Biophysics did, you would add a Collection Portlet (Content Well) to Portlet well D, E, and F.
- Add a Portlet Header.
- Under Target collection, type in the name of the collection you want to display (for example news_faculty) and click the search button. Don't worry if you forgot the exact name of the collection. Typing in 'faculty' will list all collections with faculty in the name. Click the search button.
- Click the radio button next to the collection you are looking for.
- In the Limit box, specify the maximum number of items to show in the portlet. Most sites will set this between 3 and 5 when displaying a collection in a portlet.
- Add a check next to the Show more... link option.
Our Newsroom web site uses a collection to gather news article to be displayed in the Video Library section of the home page. The only difference with this setup is that the News articles have a video rather than an image attached to them.
More examples coming soon.