Jump to content

User:Hexmode/sandbox-demo: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Hexmode (talk | contribs)
Hexmode (talk | contribs)
Line 5: Line 5:
==== With a page name passed ====
==== With a page name passed ====
Is '''{{FULLPAGENAME}}''' a top-level wikipage: {{#if:{{User:Hexmode/sandbox-root|{{FULLPAGENAME}}}}|yes|no}} (expected answer is "no")
Is '''{{FULLPAGENAME}}''' a top-level wikipage: {{#if:{{User:Hexmode/sandbox-root|{{FULLPAGENAME}}}}|yes|no}} (expected answer is "no")

Result of <nowiki>{{User:Hexmode/sandbox-root|{{FULLPAGENAME}}}}</nowiki> (we expect true for #if if not blank): "{{User:Hexmode/sandbox-root|{{FULLPAGENAME}}}}"

Is '''User:Hexmode/sandbox''' a top-level wikipage: {{#if:{{User:Hexmode/sandbox-root|User:Hexmode/sandbox}}|yes|no}} (expected answer is "no")

Result of <nowiki>{{User:Hexmode/sandbox-root|User:Hexmode/sandbox}}</nowiki> (we expect true for #if if not blank): "{{User:Hexmode/sandbox-root|User:Hexmode/sandbox}}"


Is '''User:Hexmode''' a top-level wikipage: {{#if:{{User:Hexmode/sandbox-root|User:Hexmode}}|yes|no}} (expected answer is "yes")
Is '''User:Hexmode''' a top-level wikipage: {{#if:{{User:Hexmode/sandbox-root|User:Hexmode}}|yes|no}} (expected answer is "yes")

Result of <nowiki>{{User:Hexmode/sandbox-root|User:Hexmode}}</nowiki> (we expect true for #if if not blank): "{{User:Hexmode/sandbox-root|User:Hexmode}}"


=== root template no arg ===
=== root template no arg ===

Revision as of 19:03, 3 April 2022

Issue manifested

With no parameters

Is this a top-level wikipage: no (expected answer is "no")

With a page name passed

Is User:Hexmode/sandbox-demo a top-level wikipage: no (expected answer is "no")

Is User:Hexmode a top-level wikipage: yes (expected answer is "yes")

root template no arg

  •  {{User:Hexmode/sandbox-root}}
  •  {{User:Hexmode/sandbox-root|{{FULLPAGENAME}}}}

equal template no arg

{{User:Hexmode/sandbox-equal}}

  • 1: none ({{#if:{{{1|}}}|{{{1}}}|''none''}})
  • 2: none ({{#if:{{{2|}}}|{{{2}}}|''none''}})
  • ifeq: yes ({{#ifeq:{{{1|}}}|{{{2|}}}|yes|no}})

 ({{#ifeq:{{{1|}}}|{{{2|}}}|{{{1|}}}}})

root template with Main ns page as arg

{{User:Hexmode/sandbox-root|Hexmode}}

root template with User ns page as arg

{{User:Hexmode/sandbox-root|User:Hexmode}}

  • User:Hexmode

equal template with two mismatched args

{{User:Hexmode/sandbox-equal|one|two}}

  • 1: one ({{#if:{{{1|}}}|{{{1}}}|''none''}})
  • 2: two ({{#if:{{{2|}}}|{{{2}}}|''none''}})
  • ifeq: no ({{#ifeq:{{{1|}}}|{{{2|}}}|yes|no}})

 ({{#ifeq:{{{1|}}}|{{{2|}}}|{{{1|}}}}})

equal template with two matched args

{{User:Hexmode/sandbox-equal|two|two}}

  • 1: two ({{#if:{{{1|}}}|{{{1}}}|''none''}})
  • 2: two ({{#if:{{{2|}}}|{{{2}}}|''none''}})
  • ifeq: yes ({{#ifeq:{{{1|}}}|{{{2|}}}|yes|no}})

two ({{#ifeq:{{{1|}}}|{{{2|}}}|{{{1|}}}}})