Difference between revisions of "Template:Footer Infobox"

From Captain of Industry Wiki
Jump to: navigation, search
m
Tag: Reverted
(Added {{Navbox/Vehicles}} invoke)
 
(18 intermediate revisions by the same user not shown)
Line 8: Line 8:
     so that we won't have to edit 100+ articles if some new widely-used paragraphs in articles appear.
     so that we won't have to edit 100+ articles if some new widely-used paragraphs in articles appear.
     Edit with caution and look into documentation first.**
     Edit with caution and look into documentation first.**
    -->== Test header == \n<!--


     ** Direct trading and contracts fetch. **
     ** Direct trading and contracts fetch. **
     -->{{#ifeq: {{#var: game_object_type}} | material |<!--
     -->{{#ifeq: {{#var: game_object_type}} | material |<!--
       ** todo.
       ** todo: **
     -->|}}<!--
     -->|}}<!--


     ** Recipe fetch. **
     ** Recipe fetch. **
    Storing the result first, to check if the header is needed. **
     -->{{#ifeq: {{#var: game_object_type}} | material |<!--
     -->{{#ifeq: {{#var: game_object_type}} | material |<!--
       -->{{recipe fetch|dir=out}} <!--
       -->{{#vardefine: fetched_data_1 | {{recipe fetch|dir=out}} }}<!--
       --><br /><!--
       -->{{#vardefine: fetched_data_2 | {{recipe fetch|dir=in}} }}<!--
      -->{{recipe fetch|dir=in}}<!--
     -->|}}<!--
     -->|}}<!--
     -->{{#ifeq: {{#var: game_object_type}} | building |<!--
     -->{{#ifeq: {{#var: game_object_type}} | building |<!--
       -->{{recipe fetch|isbldg=yes}}<!--
       -->{{#vardefine: fetched_data_1 | {{recipe fetch|isbldg=yes}} }}<!--
     -->|}}<!--
     -->|}}<!--
    ** Displaying a header if needed, and then displaying generated data.
    Note intended line breaks, made for proper transclusion of headers.**
    -->{{#if: {{#var: fetched_data_1}} | {{Recipe fetch header}}&#32;
{{#var: fetched_data_1}} |}}<!--
    -->{{#if: {{#var: fetched_data_2}} | {{Recipe fetch header}}&#32;
{{#var: fetched_data_2}} |}}<!--


     ** Technical check of data definition inside any article **
     ** Technical check of data definition inside any article **
Line 30: Line 35:


     ** Footer navigation boxes **
     ** Footer navigation boxes **
     -->{{#ifeq: {{#var: game_object_type}} | building |<!--
     -->{{#ifeq: {{#var: game_object_type}} | material |<!--
      -->{{Navbox/Machines}}<!--
      -->{{Navbox/Materials}}|<!--
     -->|}}<!--
      -->{{#ifeq: {{#var: game_object_type}} | building |<!--
        -->{{Navbox/Machines}}|<!--
        -->{{#ifeq: {{#var: game_object_type}} | vehicle |<!--
          -->{{Navbox/Vehicles}}<!--
        -->|}}<!--
      -->}}<!--
     -->}}<!--


   -->}}<!-- end of game_object_type check.
   -->}}<!-- end of game_object_type check.

Latest revision as of 09:47, 3 May 2023

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

This template must be invoked on the bottom of every article, which is a game object. This generally refers to any article, which starts with the usage of any of the Infobox templates.

In other words, all items, machines, etc. must contain this at their footer.

Such a structure allows to mass-edit important (but uniform) parts of articles, without the need of manually editing each of them one by one.

Examples of what this template automatically takes care of:

The above text is transcluded from Template:Footer Infobox/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 (edit | diff) and testcases (create) pages.
Please add categories and interwikis to Template:Footer Infobox/doc. (View all subpages of this page.)