Template:NewsList/doc
Jump to navigation
Jump to search
Documentation for Template:NewsList
This documentation provides information on how to use the `NewsList` template, which displays a sorted list of events from the `GlobalEvents` page in a formatted table. The table will have two columns and will be styled to occupy 100% width with horizontal scrolling for overflow content.
Template Code
{{#invoke:NewsList|generateTable
| rows = {{{rows|}}}
}}
Parameters
- rows: The number of rows to display in the table. If not specified, all events will be displayed.
Usage
To use this template on a wiki page, add the following code:
{{NewsList | rows=5}}
This will automatically fetch the data from the `GlobalEvents` page, sort the events by date (newest first), and display the specified number of rows in a two-column format.
Example
If you want to display 10 rows of events, use:
{{NewsList | rows=10}}
This template relies on the `Module:NewsList` to function correctly. Ensure that the module is correctly implemented and available on your wiki.
Notes
- The `NewsList` template fetches events from the `GlobalEvents` page. Ensure that the `GlobalEvents` page is properly formatted with event data.
- The table is styled to occupy 100% width and allows horizontal scrolling if the content overflows.