Difference between revisions of "Template:Footer Cargo"

From Captain of Industry Wiki
Jump to: navigation, search
(Error fixing)
m
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-->{{#ifeq: {{#var_final:cargo_define_invoked | no}} | yes |<!--
** Assumed to be defined at any Cargo Define template invoke. **
-->{{#varexists: cargo_define_invoked |<!--
  --><templatestyles src="Template:Footer Cargo/styles.css" /><!--
  ** This wrapper fixes alignment on pages with Navboxes at the footer. **
  --><div class="infobox-wrapper"><!--


   ** Main section.
   -->{{Ambox
    | name    = Source data defined
    | type    = notice
    | small    = 0
    | image    = [[File:Server.png|36px|link=|alt=]]
    | text    =<!--
    -->'''This {{#if: {{NAMESPACE}} | {{#if: {{NAMESPACE}} = {{ns:Template}} | template | page}} | article}} invokes definition of game's source data''' (either directly, or with one or several [[:Category:Cargo management templates | template]] invokes).<!--
    -->{{#if: {{NAMESPACE}} = {{ns:Main}} or {{NAMESPACE}} = {{ns:Template}} |<!--
      --><br/>Editing {{#if: {{NAMESPACE}} | an article, which invokes this template | it }} will result in updates to some of the stored [[Special:CargoTables | tables]], which in turn updates automated data lists. [[How to contribute | See more]].<!--
    -->}}<!--
    -->{{#if: {{NAMESPACE}} ||<!--
      --><br/>If you've found incorrect data, related to this article's topic, it is a good place to start searching for definitions, requiring updates.<!--
    -->}}<!--
  -->}}<!-- end of Ambox.


-->{{Ambox
  -->{{#if: {{NAMESPACE}} ||<!--
  | name    = Source data defined
    -->[[Category:Articles defining source data]]<!--
  | type    = notice
  -->}}<!--
  | small    = yes
  | image    = [[File:Server.png|24px|link=|alt=]]
  | text    = '''This {{#if: {{NAMESPACE}} | {{#if: {{NAMESPACE}} = {{ns:Template}} | template | page }} | article}} invokes definition of game's source data''' (either directly, or with one or several [[Category:Cargo management templates | template ]] invokes).
 
Editing it will result in updates to some of the stored [[Special:CargoTables] | tables]], which in turn updates automated data lists. [[How to contribute | See more.]]<!--
-->}}<!-- end of Ambox.
 
-->{{#if: {{NAMESPACE}} || [[Category:Articles defining source data]]}}<!--


  --></div><!-- end of alignment class.
-->}}<!-- end of cargo_define_invoked check.
-->}}<!-- end of cargo_define_invoked check.
--></includeonly><!--
--></includeonly><!--
 
--><noinclude>{{Documentation}}</noinclude>
--><noinclude><!--
-->{{documentation}}<!--
--></noinclude>

Latest revision as of 15:26, 1 May 2023

Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]


This template is supposed to be invoked on the bottom of every article and every template.

It checks if the page is directly or indirectly relevant to Cargo data definition and displays appropriate message box.

The usage is requested at the very bottom of pages, because of the mechanic used to detect data definition.

It abuses the fact, that every defining template sets a variable cargo_define_invoked. In general, we can't know where exactly on a page data was defined. To be reliable, the check must occur at the end, after all transclusions are resolved.
The above text is transcluded from Template:Footer Cargo/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Footer Cargo/doc. (View all subpages of this page.)