Difference between revisions of "Template:Infobox astronomical event"
Jump to navigation
Jump to search
imported>Mike Peel (Remove headers) |
imported>RexxS (use function 'ucfirst', rather than 'sentence' to prevent lower-casing of the rest of the returned text) |
||
(One intermediate revision by one other user not shown) | |||
Line 7: | Line 7: | ||
| data2 = {{#invoke:Wikidata|getRawValue|P528|{{{names|FETCH_WIKIDATA}}}}} | | data2 = {{#invoke:Wikidata|getRawValue|P528|{{{names|FETCH_WIKIDATA}}}}} | ||
| label3 = Event type | | label3 = Event type | ||
− | | data3 = {{#invoke:String2| | + | | data3 = {{#invoke:String2|ucfirst|{{#invoke:WikidataIB|getValue|P31|name=event_type|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{event_type|}}}}}}} |
| label4 = [[Spectral class]] | | label4 = [[Spectral class]] | ||
| data4 = {{#invoke:WikidataIB|getValue|P215|name=spectral_class|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{class|{{{type|}}} }}} }} | | data4 = {{#invoke:WikidataIB|getValue|P215|name=spectral_class|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{class|{{{type|}}} }}} }} | ||
Line 59: | Line 59: | ||
| label31 = Followed by | | label31 = Followed by | ||
| data31 = {{#invoke:WikidataIB|getValue|P156|name=followedby|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{successor|}}}}} | | data31 = {{#invoke:WikidataIB|getValue|P156|name=followedby|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{successor|}}}}} | ||
+ | |||
+ | | date35 = {{embedded}} | ||
| data40 = {{#if:{{#invoke:Wikidata|getValue|P373|{{{commons|FETCH_WIKIDATA}}} }} | {{icon|Commons}} [[Commons:{{#if:{{{commons|}}} | {{{commons}}} | Category:{{#invoke:Wikidata|getValue|P373|FETCH_WIKIDATA}} }} |Related media on Wikimedia Commons]]}} | | data40 = {{#if:{{#invoke:Wikidata|getValue|P373|{{{commons|FETCH_WIKIDATA}}} }} | {{icon|Commons}} [[Commons:{{#if:{{{commons|}}} | {{{commons}}} | Category:{{#invoke:Wikidata|getValue|P373|FETCH_WIKIDATA}} }} |Related media on Wikimedia Commons]]}} |
Latest revision as of 16:13, 11 December 2019
Script error: No such module "Wikidata". Script error: No such module "Wikidata". | |
Other designations | Script error: No such module "Wikidata". |
---|---|
Website | Template:Url |
![]() | |
[[Category:Infobox templates|Template:Remove first word]]
![]() | This template uses Lua: |
Usage
Just add:
{{infobox astronomical event}}
to the top of an article, and data will be automatically included from Wikidata where they are available. These values can be overridden by passing values to the relevant parameters in the article. The full list of parameters is:
{{Infobox astronomical event |name = |image = |image_size = |caption = |alt = |names = |event_type = |class = |start_time = |duration = |detected_by = |constellation = |ra = |dec = |epoch = |gal = |distance = |redshift = |source = |remnant = |host = |progenitor = |progenitor_type = |b-v = |notes = |peak = |energy = |website = |predecessor = |successor = |commons = |embedded = }}
Tracking categories
- Category:Articles using Infobox astronomical event using locally defined parameters (0)
- Category:Articles with infoboxes completely from Wikidata (0)
The above documentation is transcluded from Template:Infobox astronomical event/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |