User:Senefi/TestTemplate: Difference between revisions

From tgwiki2
Jump to navigation Jump to search
imported>Senefi
testing conditional inclusion for hacky template table data query
 
imported>Senefi
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq:{{{1}}}|first<--
<!--
-->|Only including first field<--
    This template serves as a reference implementation of template data querying.
-->|{{#if:{{{1|}}}||Including first and other fields<br>|}}}}
    Comments are provided to improve clarity
{{#ifeq:{{{1}}}|second<--
--><includeonly><!--
-->|Only including second field<--
    Check for inclusion of our first field either explicitly or with all other fields
-->|{{#if:{{{1|}}}||Including second and other fields<br>|}}}}
  -->{{#ifeq:{{{1}}}|first<!--
{{#ifeq:{{{1}}}|third<--
      if first unnamed parameter is "first"
-->|Only including third field<--
    -->|Only including first field<br><!--
-->|{{#if:{{{1|}}}||Including third and other fields<br>|}}}}
      else check if we do not have any unnamed parameters
    -->|{{#if:{{{1|}}}<!--
        first unnamed parameter is assigned but not equal to first, skip.
      -->|<!--
        first unnamed parameter is not assigned, include
      -->|Including first and other fields<br><!--
    -->|}}<!--
  -->|}}<!--
-->{{#ifeq:{{{1}}}|second|Only including second field<br>|{{#if:{{{1|}}}||Including second and other fields<br>|}}|}}<!--
-->{{#ifeq:{{{1}}}|third|Only including third field<br>|{{#if:{{{1|}}}||Including third and other fields<br>|}}|}}<!--
--></includeonly><!--
--><noinclude><!--
-->Test Template for conditional evaluation to replicate table querying for a specific entry<!--
--></noinclude>

Latest revision as of 09:56, 11 July 2023

Test Template for conditional evaluation to replicate table querying for a specific entry