Template

News-List

From MusicTechWiki

The Template will output an #ask query of News date property within a category.

The default category is Category:News and the default year uses the {{CURRENTYEAR}} tag to get the year from the server. Usable markup is:

{{News-List}}

or

{{News-List
|Year=2017
}}

or

{{News-List
|Year=
|Category=
}}

You may also use a month or multiple months block with the parameters `Start month` and `End month`. This shows January to June, 2017 with the default category.

{{News-List
|Year=2017
|Start month=1
|End month=6
}}

or to show just one month, use this to show just June 2017:

{{News-List
|Year=2017
|Start month=6
|End month=6
}}

or over a span of years or to show just one month, use this to show just June 2017:

{{News-List
|Year=2017
|Lastyear=2018
}}

The code in the template is:

{{#ask: [[Category:{{{Category|News}}}]]
 [[News date::≥{{{Start month|1}}}/1/{{{Startyear|{{{Year|{{CURRENTYEAR}}}}}}}}]][[News date::≤{{{End month|12}}}/31/{{{Lastyear|{{{Year|{{CURRENTYEAR}}}}}}}}]]
 |?News date#-F[F j, Y]=
 |format=ul
 |sort=News date
 |order=desc
}}