Template:Searchnews: Difference between revisions
Jump to navigation
Jump to search
Jacki Buros (talk | contribs) No edit summary |
Jacki Buros (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
|userdateformat=Y-m-d (D) | |userdateformat=Y-m-d (D) | ||
|mode=userformat | |mode=userformat | ||
|format = ,,, | |format = ,'''[[%PAGE%|%DATE%: %TITLE%]]''',, | ||
|noresultsheader= | |noresultsheader= | ||
|distinct=true | |distinct=true | ||
|resultsheader= | |resultsheader= | ||
|includepage= | |includepage=* | ||
|includemaxlength=0 | |||
|includematch={{Jb_makeregexp_pre}}{{{find}}}{{!}}{{ #foreach: find$n$ |{{!}}{{{find$n$}}}}}{{Jb_makeregexp_post}} | |includematch={{Jb_makeregexp_pre}}{{{find}}}{{!}}{{ #foreach: find$n$ |{{!}}{{{find$n$}}}}}{{Jb_makeregexp_post}} | ||
|count={{#if:{{{articlecount|}}}|{{{articlecount}}}|100}} | |count={{#if:{{{articlecount|}}}|{{{articlecount}}}|100}} | ||
}}</includeonly> | }}</includeonly> |
Revision as of 19:35, 16 February 2009
/\|\s*{{{find}}}|{{ #foreach: find$n$ ||{{{find$n$}}}}}\s*\|/s |titlematch=%{{{find}}}%{{ #foreach: find$n$ ||%{{{find$n$}}}%}}
Template usage
- use like
- {{Listnews}} to display recent news (30 articles by default)
- {{Listnews|articlecount=1}} to display most recent 1 news article.
- {{Listnews|articlecount=50}} to display 50 recent news articles.
- Note: default article display limit is set by Template:Newsarticle.dpl
- 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: debug=3 |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 = ,%DATE%: %TITLE%,, |noresultsheader= |distinct=true |resultsheader= |includepage=* |includemaxlength=0 |includematch=/\|\s*[cC]lopidogrel|{{ #foreach: find$n$ ||{{{find$n$}}}}}\s*\|/s |count=10 }} /\|\s*[cC]lopidogrel|{{ #foreach: find$n$ ||{{{find$n$}}}}}\s*\|/s |titlematch=%[cC]lopidogrel%{{ #foreach: find$n$ ||%{{{find$n$}}}%}}