Widget:News

From Guild Wars 2 Wiki
Jump to navigationJump to search

Description

This widget retrieves the current news from the rss feed found here and displays them in a list under an element with id mainpagenews. It optionally includes links to the forum provided in the add array of the options parameter.

Parameters

options
Optional. A JSON object with any of the following keys with a value:
  • count The quantity of news to display at most. Defaults to 10.
  • min The minimum number of news to show regardless of the reference elements height. Defaults to 3.
  • add An array of objects each with the keys date, link and text to include in the resulting list.
  • hide An array of titles to exlude from the resulting list.

Notes

  • This widget is used in {{News}}.

Example

<div style="min-height: 20em; border: 1px solid gray; box-sizing: border-box;">
<div id="mainpagenews"></div>
</div>
{{#Widget:News|options=
{
    "count": 10,
    "min": 5,
    "add": [
        {
            "date": "April 17, 2020",
            "link": "https://en-forum.guildwars2.com/",
            "text": "Forum News"
        }
    ],
    "hide": [
        "Super Adventure Festival 2020 is Live"
    ]
}
}}