Jump to content

Template:Organization: Difference between revisions

From Amateur Theatre Wiki
Improved formatting
Update Template
Line 1: Line 1:
<onlyinclude>
<onlyinclude>
{| class="float-right wikitable infobox" style="width: 300px;" id="template-infobox-organization" summary="Infobox for organizations"
{| class="float-right wikitable infobox" style="width: 300px;" id="template-organization" summary="Infobox for organizations"
  {{#unlinkedwikibase: id={{{qid}}} }}
{{#unlinkedwikibase: id={{{qid}}} }}


  {{#if: {{#invoke:WDfetch|getvalue|pid=P1448}} |
  |- class="hintergrundfarbe6"
  !colspan="2" style="text-align: center;" | {{#invoke:WDfetch|getvalue|pid=P1448}} <!-- Official Name (fallback: P735 + P734 if unavailable) -->
  |-
  }}


  {{#if: {{#invoke:WDfetch|getvalue|pid=P154}} |
{{#if: {{#invoke:WDfetch|getvalue|pid=P17}} |<nowiki />
  |-
    ! Country
  !colspan="2" style="text-align: center;" | [[File:{{#invoke:WDfetch|getvalue|pid=P154}}|200px]] <!-- Logo -->
    {{!}} {{#invoke:WDfetch|getvalue|pid=P17}}}}
  |-
{{!}}-
  }}
{{#if: {{#invoke:WDfetch|getvalue|pid=P571}} |<nowiki />
    ! Inception
    {{!}} {{#invoke:WDfetch|getvalue|pid=P571}}}}
|}
</onlyinclude>


  {{#if: {{#invoke:WDfetch|getvalue|pid=P18}} |
<noinclude>
  |-
== Example ==
  !colspan="2" style="text-align: center;" | [[File:{{#invoke:WDfetch|getvalue|pid=P18}}|200px]] <!-- Image -->
Below is an example usage of this template with a sample Wikidata QID.
  |-
  }}


  {{#if: {{#invoke:WDfetch|getvalue|pid=P1476}} |
{{Organization|qid=Q120730912}}
  |-
  ! Description
  ! {{#invoke:WDfetch|getvalue|pid=P1476}} <!-- Description -->
  |-
  }}


  {{#if: {{#invoke:WDfetch|getvalue|pid=P159}} |
  |-
  ! Headquarters
  ! {{#invoke:WDfetch|getvalue|pid=P159}} <!-- Headquarters -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P571}} |
  |-
  ! Founding Date
  ! {{#invoke:WDfetch|getvalue|pid=P571}} <!-- Founding Date -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P576}} |
  |-
  ! Dissolution Date
  ! {{#invoke:WDfetch|getvalue|pid=P576}} <!-- Dissolution Date -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P856}} |
  |-
  ! Official Website
  ! [{{#invoke:WDfetch|getvalue|pid=P856}} Official Website] <!-- Official Website -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P17}} |
  |-
  ! Country
  ! {{#invoke:WDfetch|getvalue|pid=P17}} <!-- Country -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P452}} |
  |-
  ! Industry
  ! {{#invoke:WDfetch|getvalue|pid=P452}} <!-- Industry -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P749}} |
  |-
  ! Parent Organization
  ! {{#invoke:WDfetch|getvalue|pid=P749}} <!-- Parent Organization -->
  |-
  }}
  {{#if: {{#invoke:WDfetch|getvalue|pid=P355}} |
  |-
  ! Subsidiaries
  ! {{#invoke:WDfetch|getvalue|pid=P355}} <!-- Subsidiaries -->
  |-
  }}
|}
</onlyinclude>
<noinclude>
<templatedata>
<templatedata>
{
{
"params": {
  "params": {
"qid": {
    "qid": {
"type": "string",
      "type": "string",
"label": "Wikidata QID",
      "label": "Wikidata QID",
"description": "Mandatory Wikidata QID to fetch all parameters dynamically from Wikidata.",
      "description": "Mandatory Wikidata QID to fetch all parameters dynamically from Wikidata.",
"required": true
      "required": true
}
    },"official_name": {
},
      "type": "string",
"description": "Infobox for an organization. Fetches all parameters dynamically from Wikidata based on the mandatory QID.",
      "label": "Official Name (P1448)",
"format": "inline"
      "description": "Official name"
    },
    "logo": {
      "type": "string",
      "label": "Logo (P154)",
      "description": "Logo image."
    },
    "image": {
      "type": "string",
      "label": "Image (P18)",
      "description": "Image."
    },
    "headquarters": {
      "type": "string",
      "label": "Headquarters (P159)",
      "description": "Headquarters."
    },
    "founding_date": {
      "type": "string",
      "label": "Founding Date (P571)",
      "description": "Founding date."
    },
    "dissolution_date": {
      "type": "string",
      "label": "Dissolution Date (P576)",
      "description": "Dissolution date."
    },
    "official_website": {
      "type": "string",
      "label": "Official Website (P856)",
      "description": "Official website."
    },
    "country": {
      "type": "string",
      "label": "Country (P17)",
      "description": "Country."
    },
    "parent_organization": {
      "type": "string",
      "label": "Parent Organization (P749)",
      "description": "Parent organization."
    }
  },
  "description": "Infobox for an organization. Fetches all parameters dynamically from Wikidata based on the mandatory QID.",
  "format": "inline"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Revision as of 23:23, 20 February 2025

UnlinkedWikibase error: ID '{{{qid}}}' is not in the required format of an integer prefixed with 'Q'.
Country UnlinkedWikibase error: ⧼unlinkedwikibase-error-statements-entity-not-set⧽
Inception UnlinkedWikibase error: ⧼unlinkedwikibase-error-statements-entity-not-set⧽


Example

Below is an example usage of this template with a sample Wikidata QID.



Infobox for an organization. Fetches all parameters dynamically from Wikidata based on the mandatory QID.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Wikidata QIDqid

Mandatory Wikidata QID to fetch all parameters dynamically from Wikidata.

Stringrequired
Official Name (P1448)official_name

Official name

Stringoptional
Logo (P154)logo

Logo image.

Stringoptional
Image (P18)image

Image.

Stringoptional
Headquarters (P159)headquarters

Headquarters.

Stringoptional
Founding Date (P571)founding_date

Founding date.

Stringoptional
Dissolution Date (P576)dissolution_date

Dissolution date.

Stringoptional
Official Website (P856)official_website

Official website.

Stringoptional
Country (P17)country

Country.

Stringoptional
Parent Organization (P749)parent_organization

Parent organization.

Stringoptional