Template:News: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<templatestyles src="News.css" />
<noinclude>
<includeonly>{{#invoke:News|main}}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
{{#template_params:
|seo_title(label=SEO Title)
|seo_keywords(label=SEO Keywords)
|seo_description(label=SEO Description)
|tags(label=Tags)
|original_author (label=Original Author)
|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=Test
|seo_title=String
|seo_keywords=List (,) of String
|seo_description=String
|tags=List (,) of String
|author = Page
|original_author = Page
|image=File
|targets=List (,) of Page
|date=Datetime
|sources=List (,) of Page
|category=List (,) of String (hierarchy;allowed values=
*General
*Transfer Market
*Drama
*Business
**Companies
**Hires
**Investments
**Deals
*Sponsorship
)
|game=List (,) of String (hierarchy;allowed values=
*Aarba
*Age of Empires
*Apex Legends
*Brawl Stars
*Call of Duty
*Counter Strike
*Dota 2
*FIFA
*Hearthstone
*League of Legends
*Mobile Legends
*Overwatch
*PUBG
*PUBG Mobile
*Rainbow Six
*Rocket League
*Smash
*Starcraft II
*Valorant
*Warcraft III
*Wild Rift
)
|content=Text}}
</noinclude><includeonly>
{{#cargo_store:_table=News}}
{{#seo:
|title={{#if: {{{seo_title|}}} | {{{seo_title|}}} }}
|description={{#if: {{{seo_description|}}} | {{{seo_description|}}} }}
|keywords={{#if: {{{seo_keywords|}}} | {{{seo_keywords|}}} }}
}}
[[{{{author|}}}]] {{#time: d F Y H:i | {{{date|}}} }}
 
{{#if: {{{image|}}} | [[File:{{{image|}}}|500x200px]] }}
 
{{{content|}}}
 
=== Tags ===
{{#arraymap: {{{tags|}}}|,|x|<span class="plainlinks">[{{SERVER}}/Tag?name=x x]</span>|\s }}
 
== Sources ==
{{#arraymap: {{{sources|}}}|,|x|[[x]]|\s }}
{{#arraymap: {{{category|}}}|,|x|[[Category:x]]|\s }}
[[Category:News]]
</includeonly>

Revision as of 17:17, 4 May 2023

This is the "News" template.

It should be called in the following format:

{{News
|seo_title=
|seo_keywords=
|seo_description=
|tags=
|original_author=
|image=
|targets=
|date=
|sources=
|category=
|game=
|content=
|author=
}}

Edit the page to see the template text.

This template defines the table "Test". This table has not been created yet.