Template:Dailynews: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<includeonly>{{#ifeq:{{PAGESINCAT:{{#time:F j, Y|{{#ifeq:{{{prev|}}}|||-{{{prev}}} days}}}}}}|0||{{#dpl:
 
category=Published&{{#time:F j, Y|{{#ifeq:{{{prev|}}}|||-{{{prev}}} days}}}}
<includeonly>{{#dpl:
 
category=Published&{{#time:F j, Y|-{{{1}}} days}}
 
|namespace=News
|namespace=News
|notcategory=Disputed
|notcategory=Disputed
|notcategory=Not_published
|notcategory=Not_published
|shownamespace=false
|shownamespace=false
|ordermethod=lastedit
|ordermethod=lastedit
 
|addauthor=false
|addauthor=true
|reset=categories
 
|noresultsheader=&nbsp;
|noresultsheader=&nbsp;
 
|distinct=strict
|resultsheader=<h3>{{#time:F j|-{{{1}}} days}}</h3>
|mode=userformat
 
|format  = ,,,
|includepage=*
|resultsheader=<h3>{{#time:F j|{{#ifeq:{{{prev|}}}|||-{{{prev}}} days}}}}</h3>
 
|includepage={newsarticle}.nodate,{newsarticle2}.nodate
|includemaxlength=300
|secseparators  = ,
 
|dominantsection=1
}}</includeonly><noinclude>
|count={{#if:{{{articlecount|}}}|{{{articlecount}}}|100}}}}}}</includeonly><noinclude>
 
=== Template usage ===
=== Template usage ===
* use like
* use like
** <nowiki>{{Dailynews}}</nowiki> to display today's news
** <nowiki>{{Dailynews|prev=1}}</nowiki> to display yesterday's news.
** <nowiki>{{Dailynews|len=200}}</nowiki> to display today's news and limit display length per article.
** <nowiki>{{Dailynews|prev=1|len=200}}</nowiki> to display yesterday's news with length limit.
* Note: default limit is 300 chars


<nowiki>{{News2|1}}</nowiki> to display yesterday's news.
* <nowiki>{{News2|0}}</nowiki> will display today's news, like this


=== example display (today & yesterday's news) ===
=== example display (today & yesterday's news) ===
 
{{dailynews|prev=0}}
{{News2|0}}
{{dailynews|prev=1|len=100}}
 
{{News2|1}}
 
</noinclude>
</noinclude>

Latest revision as of 19:52, 17 March 2009

Template usage

  • use like
    • {{Dailynews}} to display today's news
    • {{Dailynews|prev=1}} to display yesterday's news.
    • {{Dailynews|len=200}} to display today's news and limit display length per article.
    • {{Dailynews|prev=1|len=200}} to display yesterday's news with length limit.
  • Note: default limit is 300 chars


example display (today & yesterday's news)