Template:BSLjunc: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(re-indenting and adding comments to help me follow code structure; removing superfluous closing braces)
(placing closing braces in right place, re-commenting, re-indenting)
Line 10: Line 10:
|win={{{win}}}<!--
|win={{{win}}}<!--
         -->}}<!-- end BSLtableinfo
         -->}}<!-- end BSLtableinfo
   else -->|{{#ifeq:{{#replace:{{lcfirst:{{PAGENAME}}}}| |_}}<!-- "if PAGENAME == name when we de-capitalize PAGENAME and restore the underscore"
   else -->|{{#ifeq:{{#replace:{{lcfirst:{{PAGENAME}}}}| |_}}<!-- "if PAGENAME == name when we de-capitalize PAGENAME and restore the underscore"...
               -->|{{{name}}}<!--
               -->|{{{name}}}<!--
          then -->|{{Retitle|{{{name}}}}}<!--
              -->|{{Retitle|{{{name}}}}}<!--                 ...fix page title
                 -->This is a single {{#ifeq:{{{kind}}}<!--      "if kind == func"
                 -->This is a single {{#ifeq:{{{kind}}}<!--      and print "single listing" message
                                         -->|func<!--
                                         -->|func<!--
                                         -->|function<!--
                                         -->|function<!--
                                         -->|variable<!--
                                         -->|variable<!--
                                 -->}} listing. <!--         end "if kind == func"
                                 -->}} listing. <!--
                 -->To see this command in the context of related commands, <!--
                 -->To see this command in the context of related commands, <!--
                 -->go to the [[BSL:{{Find BSL Group|{{{name}}}}}]] page.<!--
                 -->go to the [[BSL:{{Find BSL Group|{{{name}}}}}]] page.<!--
          else -->|Click [[{{{name}}}]] to edit info.<!--
              -->|Click [[{{{name}}}]] to edit info.<!--       otherwise, print "group listing" message
                -->{{#ifeq:{{{kind}}}<!--                       "if kind == func"
          }}<!--                                            end "if PAGENAME == name"
                      -->|func
        -->{{#ifeq:{{{kind}}}<!--                               "if kind == func"
                  then -->|{{BSLfuncinfo
              -->|func
              -->|{{BSLfuncinfo
|type={{{type}}}
|type={{{type}}}
|default={{{default}}}
|default={{{default}}}
Line 78: Line 79:
|arg8altname={{{arg8altname}}}<!--
|arg8altname={{{arg8altname}}}<!--
                         -->}}<!-- end BSLfuncinfo
                         -->}}<!-- end BSLfuncinfo
                  else -->|{{BSLvarinfo
                      -->|{{BSLvarinfo
|type={{{type}}}
|type={{{type}}}
|default={{{default}}}
|default={{{default}}}
Line 85: Line 86:
|win={{{win}}}<!--
|win={{{win}}}<!--
                         -->}}<!-- end BSLvarinfo
                         -->}}<!-- end BSLvarinfo
                -->}}<!-- end "if kind == func"
        -->}}<!--                                           end "if kind == func"
        -->}}<!-- end "if PAGENAME == name"
-->}}<!--                                                   end "if tableform == yes"
-->}}<!-- 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:17, 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.