Template:Dailynews: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
 
(35 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#dpl:
<includeonly>{{#ifeq:{{PAGESINCAT:{{#time:F j, Y|{{#ifeq:{{{prev|}}}|||-{{{prev}}} days}}}}}}|0||{{#dpl:
category=Published&{{#time:F j, Y|-{{{prev}}} days}}
category=Published&{{#time:F j, Y|{{#ifeq:{{{prev|}}}|||-{{{prev}}} days}}}}
|namespace=News
|namespace=News
|notcategory=Disputed
|notcategory=Disputed
Line 7: Line 7:
|ordermethod=lastedit
|ordermethod=lastedit
|addauthor=false
|addauthor=false
|reset=categories
|noresultsheader=&nbsp;
|noresultsheader=&nbsp;
|resultsheader=<h3>{{#time:F j|-{{{prev}}} days}}</h3>
|distinct=strict
|includepage=*
|mode=userformat
|includemaxlength={{#if:{{{len}}}|{{{len}}}|300}}
|format  = ,,,
}}</includeonly><noinclude>
|resultsheader=<h3>{{#time:F j|{{#ifeq:{{{prev|}}}|||-{{{prev}}} days}}}}</h3>
|includepage={newsarticle}.nodate,{newsarticle2}.nodate
|secseparators  = ,
|dominantsection=1
|count={{#if:{{{articlecount|}}}|{{{articlecount}}}|100}}}}}}</includeonly><noinclude>
=== Template usage ===
=== Template usage ===
* use like
* use like
* <nowiki>{{Dailynews|prev=1}}</nowiki> to display yesterday's news.
** <nowiki>{{Dailynews}}</nowiki> to display today's news
* <nowiki>{{Dailynews|prev=0}}</nowiki> will display today's news, like this
** <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
 
 
=== example display (today & yesterday's news) ===
=== example display (today & yesterday's news) ===
{{dailynews|prev=0}}
{{dailynews|prev=0}}
{{dailynews|prev=1}}
{{dailynews|prev=1|len=100}}
</noinclude>
</noinclude>
[[Category:Not_published]]

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)