Template:Listnews: Difference between revisions
Jump to navigation
Jump to search
Jacki Buros (talk | contribs) No edit summary |
Jacki Buros (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
|includepage={newsarticle}.dpl | |includepage={newsarticle}.dpl | ||
|secseparators = \n,\n | |secseparators = \n,\n | ||
|count=30 | |count={{#if:{{{articlecount|}}}|{{{articlecount}}}|30}} | ||
|limit={{#if:{{{articlelen|}}}|{{{articlelen}}}|300}} | |||
}}</includeonly> | }}</includeonly> | ||
<noinclude> | <noinclude> | ||
=== Template usage === | === Template usage === | ||
* use like | * use like | ||
** <nowiki>{{Listnews}}</nowiki> to display | ** <nowiki>{{Listnews}}</nowiki> to display recent news (30 articles by default) | ||
** <nowiki>{{Listnews| | ** <nowiki>{{Listnews|articlecount=1}}</nowiki> to display most recent 1 news article. | ||
** <nowiki>{{Listnews| | ** <nowiki>{{Listnews|articlelen=200}}</nowiki> to display recent news and limit display length per article. | ||
** <nowiki>{{Listnews| | ** <nowiki>{{Listnews|articlecount=50|articlelen=200}}</nowiki> to display 50 recent news articles with length limit. | ||
* Note: default limit is 300 chars | * Note: default article display limit is 300 chars | ||
* Note: default number of articles is 30 articles | |||
=== Template customization === | |||
* [[:Template:newsarticle.dpl|Edit display per article in news listing]] | |||
* [[:Template:newsarticle|Edit display of summary in article contents]] | |||
* [[:Template:NewsStub|View use of news article template]] | |||
=== example display (last | === example display (last recent news with defaults) === | ||
{{listnews}} | {{listnews}} | ||
</noinclude> | </noinclude> |
Revision as of 22:26, 15 February 2009
Template usage
- use like
- {{Listnews}} to display recent news (30 articles by default)
- {{Listnews|articlecount=1}} to display most recent 1 news article.
- {{Listnews|articlelen=200}} to display recent news and limit display length per article.
- {{Listnews|articlecount=50|articlelen=200}} to display 50 recent news articles with length limit.
- Note: default article display limit is 300 chars
- Note: default number of articles is 30 articles
Template customization
- Edit display per article in news listing
- Edit display of summary in article contents
- View use of news article template
example display (last recent news with defaults)
{{#dpl: category=Published |namespace=News |notcategory=Disputed |notcategory=Not_published |shownamespace=false |ordermethod=sortkey |order=descending |addauthor=false |reset=categories |addfirstcategorydate=true |userdateformat=Y-m-d (D) |mode=userformat |format = ,,, |noresultsheader= |distinct=true
|resultsheader=
Wikidoc Daily News
|includepage={newsarticle}.dpl |secseparators = \n,\n |count=30 |limit=300 }}