Template:BSLjunc: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(use long-form template when on individual command page)
(undoing for now until I have time to troubleshoot it)
 
Line 2: Line 2:
-->{{#ifeq:{{{tableform|}}}<!-- "if tableform == yes"
-->{{#ifeq:{{{tableform|}}}<!-- "if tableform == yes"
       -->|yes<!--
       -->|yes<!--
      -->|{{BSLtableinfo
  then -->|{{BSLtableinfo
|group={{{group}}}
|group={{{group}}}
|kind={{{kind}}}
|kind={{{kind}}}
Line 9: Line 9:
|mac={{{mac}}}
|mac={{{mac}}}
|win={{{win}}}<!--
|win={{{win}}}<!--
        -->}}<!-- end BSLtableinfo
        -->}}<!-- end BSLtableinfo
        -->|{{#ifeq:{{#replace:{{lcfirst:{{PAGENAME}}}}| |_}}<!-- "if tableform != yes", and if the page name, de-capitalized and with underscores for spaces...
  else -->|{{#ifeq:{{#replace:{{lcfirst:{{PAGENAME}}}}| |_}}<!-- "if PAGENAME == name when we de-capitalize PAGENAME and restore the underscore"...
               -->|{{{name}}}<!--                                                       ...matches the name of the command, then we're on the command page...
               -->|{{{name}}}<!--
               -->|{{Retitle|{{{name}}}}}<!--                                       ...so fix the page title...
               -->|{{Retitle|{{{name}}}}}<!--                 ...fix page title
                 -->{{#ifeq:{{{kind}}}<!--                                             ...and call the long-form info template, after figuring out if this is a func or var
                 -->Edit this page to change this command's information. <!-- and print "standalone" message
                      -->|func<!-- no long-form func template yet, so call regular one
                -->To see this command in the context of related commands, <!--
                      -->|{{BSLfuncinfo
                -->go to the [[BSL:{{Find BSL Group|{{{name}}}}}]] page.<br /><!--
|type={{{type|}}}
        -->}}<!--                                           end "if PAGENAME == name"
|default={{{default|}}}
        -->{{#ifeq:{{{kind}}}<!--                               "if kind == func"
|name={{{name|}}}
              -->|func<!--
|mac={{{mac|}}}
              -->|{{BSLfuncinfo
|win={{{win|}}}
|arg1optional={{{arg1optional|}}}
|arg1default={{{arg1default|}}}
|arg1type={{{arg1type|}}}
|arg1name={{{arg1name|}}}
|arg1alttype={{{arg1alttype|}}}
|arg1altname={{{arg1altname|}}}
|arg2optional={{{arg2optional|}}}
|arg2default={{{arg2default|}}}
|arg2type={{{arg2type|}}}
|arg2name={{{arg2name|}}}
|arg2alttype={{{arg2alttype|}}}
|arg2altname={{{arg2altname|}}}
|arg3optional={{{arg3optional|}}}
|arg3default={{{arg3default|}}}
|arg3type={{{arg3type|}}}
|arg3name={{{arg3name|}}}
|arg3alttype={{{arg3alttype|}}}
|arg3altname={{{arg3altname|}}}
|arg4optional={{{arg4optional|}}}
|arg4default={{{arg4default|}}}
|arg4type={{{arg4type|}}}
|arg4name={{{arg4name|}}}
|arg4alttype={{{arg4alttype|}}}
|arg4altname={{{arg4altname|}}}
|arg5optional={{{arg5optional|}}}
|arg5default={{{arg5default|}}}
|arg5type={{{arg5type|}}}
|arg5name={{{arg5name|}}}
|arg5alttype={{{arg5alttype|}}}
|arg5altname={{{arg5altname|}}}
|arg6optional={{{arg6optional|}}}
|arg6default={{{arg6default|}}}
|arg6type={{{arg6type|}}}
|arg6name={{{arg6name|}}}
|arg6alttype={{{arg6alttype|}}}
|arg6altname={{{arg6altname|}}}
|arg7optional={{{arg7optional|}}}
|arg7default={{{arg7default|}}}
|arg7type={{{arg7type|}}}
|arg7name={{{arg7name|}}}
|arg7alttype={{{arg7alttype|}}}
|arg7altname={{{arg7altname|}}}
|arg8optional={{{arg8optional|}}}
|arg8default={{{arg8default|}}}
|arg8type={{{arg8type|}}}
|arg8name={{{arg8name|}}}
|arg8alttype={{{arg8alttype|}}}
|arg8altname={{{arg8altname|}}}<!-- else "if kind != func", call long-form var template
                      -->|{{BSLvarlong
|name={{{name|}}}
|type={{{type|}}}
|default={{{default|}}}}}<!--
                -->}}<!-- end func/var determination
              -->|{{#ifeq:{{{kind}}}<!-- else we're not on a command page, so call regular-length info template for func or var
                      -->|func<!--
                      -->|{{BSLfuncinfo
|type={{{type|}}}
|type={{{type|}}}
|default={{{default|}}}
|default={{{default|}}}
Line 138: Line 81:
|win={{{win}}}<!--
|win={{{win}}}<!--
                         -->}}<!-- end BSLvarinfo
                         -->}}<!-- end BSLvarinfo
              -->}}<!-- end "if PAGENAME == name"
        -->}}<!--                                           end "if kind == func"
-->}}<!-- 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:Table templates]]</noinclude>
[[Category:Table templates]]</noinclude>

Latest revision as of 05:40, 22 February 2018

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.