Template:News: Difference between revisions

Template page
No edit summary
mNo edit summary
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<templatestyles src="NewsArticle.css" />
<noinclude>
<noinclude>
{{#template_params:
|seo_title(label=SEO Title)
|seo_keywords(label=SEO Keywords)
|seo_description(label=SEO Description)
|tags(label=Tags)
|image(label=Image;namespace=File)
|targets (label=Targets)
|date (label=Date)
|sources (label=Sources)
|category (label=Category)
|game (label=Game)
|content (label=Content)
|author (label=Author)
}}
{{#cargo_declare:_table=News
{{#cargo_declare:_table=News
|seo_title=String
|image=File
|seo_keywords=List (,) of String
|image_alt=String
|seo_description=String
|tags=List (,) of String
|tags=List (,) of String
|author = Page
|image=File
|targets=List (,) of Page
|targets=List (,) of Page
|date=Datetime
|date=Datetime
|sources=List (,) of Page
|author = Page
|category=List (,) of String (hierarchy;allowed values=
|category= List (,) of String (hierarchy; allowed values=
*General
*Transfer Market
*Transfer Market
*Drama
*Drama
Line 32: Line 15:
**Hires
**Hires
**Investments
**Investments
**Deals
**Mergers and Acquisitions
*Sponsorship
**Sponsorships
*More
)
)
|game=List (,) of String (hierarchy;allowed values=
|game=List (,) of String (hierarchy; allowed values=
*Age of Empires
*Age of Empires
*Apex Legends
*Apex Legends
Line 43: Line 27:
*Dota 2
*Dota 2
*FIFA
*FIFA
*Fortnite
*Hearthstone
*Hearthstone
*League of Legends
*League of Legends
*Mobile Legends
*Mobile Legends
*NBA 2K
*Overwatch
*Overwatch
*PUBG
*PUBG
Line 55: Line 41:
*Valorant
*Valorant
*Warcraft III
*Warcraft III
*World of Warcraft
*Wild Rift
*Wild Rift
)
)
|content=Text}}
|content=Text}}
</noinclude><includeonly>{{DISPLAYTITLE: {{{seo_title|}}} }}{{#cargo_store:_table=News}}{{#seo:
</noinclude><includeonly>{{DISPLAYTITLE: {{{seo_title|}}} }}{{#if: {{{stub|}}} | {{Stub|type=News|comment={{{stub}}} }} }}{{#cargo_store:_table=News
|image={{{image|}}}
|image_alt={{{alt|}}}
|tags={{{tags|}}}
|targets={{{target|}}}
|date={{{date|}}}
|author={{{author|}}}
|category={{{category|}}}
|game={{{game|}}}
|content={{{content|}}}
}}{{#seo:
|title={{{seo_title|}}}
|title={{{seo_title|}}}
|description={{{seo_description|}}}
|description={{{seo_description|}}}
Line 64: Line 61:
|image={{{image|}}}
|image={{{image|}}}
|image_alt={{{alt|}}}
|image_alt={{{alt|}}}
|tags={{{tags|}}}
|targets={{{target|}}}
|date={{{date|}}}
|sources={{{sources|}}}
|author={{{author|}}}
|author={{{author|}}}
|published_time={{{date|}}}
|category={{{category|}}}
|game={{{game|}}}
|content={{{content|}}}
}}
}}
[[{{{author|}}}]] {{#time: d F Y H:i | {{{date|}}} }}
{{NewsNav}}
<div class="news__grid">
<div>
Written by [[{{{author|}}}]] on {{#time: d F Y H:i | {{{date|}}} }}


{{#if: {{{image|}}} | [[File:{{{image|}}}|800x600px|link=]] }}
{{#if: {{{image|}}} | <div class="resp-img">[[File:{{{image|}}}|800x600px|link=]]</div> }}


{{#if: {{{image|}}} | {{FileDescription|{{{image|}}}}} }}
{{#if: {{{image|}}} | {{FileDescription|{{{image|}}}}} }}


{{{content|}}}
{{{content|}}}
<div style="clear: both;"></div>
<div style="clear: both;"></div>
'''Tags'''
{{#if: {{{tags|}}} | '''Tags:''' {{#arraymap: {{{tags|}}}|,|x|<span class="plainlinks">[{{SERVER}}/News/Search?tag={{urlencode: x}} x]</span>|\s }} }}
{{#arraymap: {{{tags|}}}|,|x|<span class="plainlinks">[{{SERVER}}/Tag?name={{urlencode: x}} x]</span>|\s }}
 
{{#if: {{{sources|}}} |
<div>
<b>Sources:</b> <div style="display: inline-flex; flex-wrap: wrap; gap: var(--space-xs);>{{#arraymap: {{{sources|}}}|,|x|x| \s }} </div>
</div>
}}  


{{#if: {{{sources|}}} |{{#arraymap: {{{sources|}}}|,|x|x|\s }} }}
<div>
{{#arraymap: {{{category|}}}|,|x|[[Category:x]]|\s }}
<b>Categories:</b><ul class="catlinks" style="display: inline-flex; flex-wrap: wrap; margin: var(--space-xs) 0 0 10px; font-size: 0.8125rem; gap: var(--space-xs); letter-spacing: 0;">
{{#arraymap: {{{category|}}}|,|x|<li style="">[[News/x|x]]</li>|\s }}
</ul>
</div>
</div>
<div>
{{RelatedNews|tags={{{tags|}}} |categories={{{category|}}} }}
</div>
</div>
[[Category:News]]
[[Category:News]]
</includeonly>
</includeonly>

Latest revision as of 17:41, 29 April 2024

This template defines the table "News". View table.