User:Senefi/TestTemplate: Difference between revisions

From tgwiki2
Jump to navigation Jump to search
imported>Senefi
No edit summary
imported>Senefi
No edit summary
 
Line 1: Line 1:
<includeonly>{{#ifeq:{{{1}}}|first|Only including first field<br>|{{#if:{{{1|}}}||Including first and other fields<br>|}}|}}<!--
<!--
    This template serves as a reference implementation of template data querying.
    Comments are provided to improve clarity
--><includeonly><!--
    Check for inclusion of our first field either explicitly or with all other fields
  -->{{#ifeq:{{{1}}}|first<!--
      if first unnamed parameter is "first"
    -->|Only including first field<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}}}|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>|}}|}}<!--
-->{{#ifeq:{{{1}}}|third|Only including third field<br>|{{#if:{{{1|}}}||Including third and other fields<br>|}}|}}<!--

Latest revision as of 09:56, 11 July 2023

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