Template:BSLjunc: Difference between revisions
Jump to navigation
Jump to search
(BSLjunc now supports BSLvarinfo, and passes through all the info that is used by BSLfuncinfo and BSLtableinfo) |
(re-indenting and adding comments to help me follow code structure; removing superfluous closing braces) |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{tableform|}}}|yes<!-- | <includeonly><!-- | ||
-->{{#ifeq:{{{tableform|}}}<!-- "if tableform == yes" | |||
-->|yes<!-- | |||
then -->|{{BSLtableinfo | |||
|group={{{group}}} | |||
|kind={{{kind}}} | |||
|type={{{type}}} | |||
|name={{{name}}} | |||
|mac={{{mac}}} | |||
|win={{{win}}}<!-- | |||
-->}}<!-- end BSLtableinfo | |||
else -->|{{#ifeq:{{#replace:{{lcfirst:{{PAGENAME}}}}| |_}}<!-- "if PAGENAME == name when we de-capitalize PAGENAME and restore the underscore" | |||
-->|{{{name}}}<!-- | |||
then -->|{{Retitle|{{{name}}}}}<!-- | |||
-->This is a single {{#ifeq:{{{kind}}}<!-- "if kind == func" | |||
-->|func<!-- | |||
-->|function<!-- | |||
-->|variable<!-- | |||
-->}} listing. <!-- end "if kind == func" | |||
-->To see this command in the context of related commands, <!-- | |||
-->go to the [[BSL:{{Find BSL Group|{{{name}}}}}]] page.<!-- | |||
else -->|Click [[{{{name}}}]] to edit info.<!-- | |||
-->{{#ifeq:{{{kind}}}<!-- "if kind == func" | |||
-->|func | |||
then -->|{{BSLfuncinfo | |||
|type={{{type}}} | |type={{{type}}} | ||
|default={{{default}}} | |default={{{default}}} | ||
Line 65: | Line 77: | ||
|arg8alttype={{{arg8alttype}}} | |arg8alttype={{{arg8alttype}}} | ||
|arg8altname={{{arg8altname}}}<!-- | |arg8altname={{{arg8altname}}}<!-- | ||
-->}}<!-- end BSLfuncinfo | |||
else -->|{{BSLvarinfo | |||
|type={{{type}}} | |type={{{type}}} | ||
|default={{{default}}} | |default={{{default}}} | ||
Line 72: | Line 84: | ||
|mac={{{mac}}} | |mac={{{mac}}} | ||
|win={{{win}}}<!-- | |win={{{win}}}<!-- | ||
-->}}<!-- end BSLvarinfo | |||
-->}}<!-- end "if kind == func" | |||
-->}}<!-- end "if PAGENAME == name" | |||
-->}}<!-- end "if tableform == yes" | |||
--></includeonly><noinclude> | --></includeonly><noinclude> | ||
BSLjunc is what could be called a "junction template"; in displaying the information about a function or variable which is passed into it, it determines which of three templates to call -- [[Template:BSLtableinfo|BSLtableinfo]], [[Template:BSLfuncinfo|BSLfuncinfo]], or [[Template:BSLvarinfo|BSLvarinfo]] -- depending on circumstances which are fully explained on [[BSL:Grouping]]. This template is used to display command information on individual BSL [[:Category:BSL functions|function]] and [[:Category:BSL variables|variable]] pages, on [[:Category:Scripting tasks|scripting task]] pages, and on [[BSL:List]]. It is also responsible for [[Template:Retitle|re-titling]] the individual function/variable pages to use the correct capitalization and underscores found in the original command names, and for displaying messages that direct the reader from the individual page to the scripting task page or vice versa. | BSLjunc is what could be called a "junction template"; in displaying the information about a function or variable which is passed into it, it determines which of three templates to call -- [[Template:BSLtableinfo|BSLtableinfo]], [[Template:BSLfuncinfo|BSLfuncinfo]], or [[Template:BSLvarinfo|BSLvarinfo]] -- depending on circumstances which are fully explained on [[BSL:Grouping]]. This template is used to display command information on individual BSL [[:Category:BSL functions|function]] and [[:Category:BSL variables|variable]] pages, on [[:Category:Scripting tasks|scripting task]] pages, and on [[BSL:List]]. It is also responsible for [[Template:Retitle|re-titling]] the individual function/variable pages to use the correct capitalization and underscores found in the original command names, and for displaying messages that direct the reader from the individual page to the scripting task page or vice versa. | ||
[[Category:Basic formatting templates]]</noinclude> | [[Category:Basic formatting templates]]</noinclude> |
Revision as of 17:06, 13 December 2015
BSLjunc is what could be called a "junction template"; in displaying the information about a function or variable which is passed into it, it determines which of three templates to call -- BSLtableinfo, BSLfuncinfo, or BSLvarinfo -- depending on circumstances which are fully explained on BSL:Grouping. This template is used to display command information on individual BSL function and variable pages, on scripting task pages, and on BSL:List. It is also responsible for re-titling the individual function/variable pages to use the correct capitalization and underscores found in the original command names, and for displaying messages that direct the reader from the individual page to the scripting task page or vice versa.