Welcome to the Virtual Education Wiki ~ Open Education Wiki
Test if: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== #IF parser function == | == #IF parser function == | ||
<nowiki>{{#show:Albania/OER| ?Has capital|link=none}}</nowiki> yields {{#show:Albania/OER| ?Has capital}} | <nowiki>{{#show:Albania/OER| ?Has capital|link=none}}</nowiki> yields {{#show:Albania/OER| ?Has capital|link=none}} | ||
<nowiki>{{#if:| yes | no}}</nowiki> yields {{#if:string| yes | no}} | <nowiki>{{#show:Hungary | ?In OECD}}</nowiki> yields "{{#show:Hungary | ?In OECD}}" | ||
<nowiki>{{#show:Brazil| ?In OECD}}</nowiki> yields "{{#show:Brazil| ?In OECD}}" | |||
<nowiki>{{#if:string | yes | no}}</nowiki> yields "{{#if:string| yes | no}}" | |||
<nowiki>{{#if:{{#show:Brazil| ?In OECD}}| yes | no}}</nowiki> yields "{{#if:{{#show:Brazil| ?In OECD}}| yes | no}}" | |||
<nowiki>{{#if:{{#show:France| ?In OECD}}| yes | no}}</nowiki> yields "{{#if:{{#show:France| ?In OECD}}| yes | no}}" | |||
Thus: | |||
<nowiki>{{#if:{{#show:Brazil| ?In OECD}}|Category:OECD|}}</nowiki> yields "{{#if:{{#show:Brazil| ?In OECD}}|Category:OECD|}}" | |||
<nowiki>{{#if:{{#show:France| ?In OECD}}|Category:OECD|}}</nowiki> yields "{{#if:{{#show:France| ?In OECD}}|Category:OECD|}}" | |||
Thus: | |||
<nowiki>[[{{#if:{{#show:France| ?In OECD}}|Category:OECD|}}]]</nowiki> yields "[[{{#if:{{#show:France| ?In OECD}}|Category:OECD|}}]]" | |||
But the [[ ]] codes do not make it a valid category definition. | |||
What about | |||
<nowiki>{{#if:{{#show:France| ?In OECD}}|[[:Category:OECD]]|}}</nowiki> yields "{{#if:{{#show:France| ?In OECD}}|[[:Category:OECD]]|}}" | |||
----- | ----- |
Latest revision as of 20:27, 5 May 2023
#IF parser function
{{#show:Albania/OER| ?Has capital|link=none}} yields Tirana
{{#show:Hungary | ?In OECD}} yields "true"
{{#show:Brazil| ?In OECD}} yields ""
{{#if:string | yes | no}} yields "yes"
{{#if:{{#show:Brazil| ?In OECD}}| yes | no}} yields "no"
{{#if:{{#show:France| ?In OECD}}| yes | no}} yields "yes"
Thus:
{{#if:{{#show:Brazil| ?In OECD}}|Category:OECD|}} yields ""
{{#if:{{#show:France| ?In OECD}}|Category:OECD|}} yields "Category:OECD"
Thus:
[[{{#if:{{#show:France| ?In OECD}}|Category:OECD|}}]] yields ""
But the [[ ]] codes do not make it a valid category definition.
What about
{{#if:{{#show:France| ?In OECD}}|[[:Category:OECD]]|}} yields "Category:OECD"
>> Main Page