<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>https://www.dezfulwiki.com/index.php?action=history&amp;feed=atom&amp;title=%D8%A7%D9%84%DA%AF%D9%88%3AIf_then_show%2F%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA</id>
	<title>الگو:If then show/توضیحات - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="https://www.dezfulwiki.com/index.php?action=history&amp;feed=atom&amp;title=%D8%A7%D9%84%DA%AF%D9%88%3AIf_then_show%2F%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA"/>
	<link rel="alternate" type="text/html" href="https://www.dezfulwiki.com/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:If_then_show/%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA&amp;action=history"/>
	<updated>2026-05-10T22:35:22Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://www.dezfulwiki.com/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:If_then_show/%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA&amp;diff=436&amp;oldid=prev</id>
		<title>Amin: ۱ نسخه واردشده</title>
		<link rel="alternate" type="text/html" href="https://www.dezfulwiki.com/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:If_then_show/%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA&amp;diff=436&amp;oldid=prev"/>
		<updated>2021-10-19T01:51:41Z</updated>

		<summary type="html">&lt;p&gt;۱ نسخه واردشده&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fa&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ‏۱۹ اکتبر ۲۰۲۱، ساعت ۱۱:۵۱&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;fa&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(بدون تفاوت)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Amin</name></author>
	</entry>
	<entry>
		<id>https://www.dezfulwiki.com/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:If_then_show/%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA&amp;diff=435&amp;oldid=prev</id>
		<title>dezfulwiki&gt;Hanooz: صفحه‌ای تازه حاوی «{{زیرصفحه توضیحات}} &lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [...» ایجاد کرد</title>
		<link rel="alternate" type="text/html" href="https://www.dezfulwiki.com/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:If_then_show/%D8%AA%D9%88%D8%B6%DB%8C%D8%AD%D8%A7%D8%AA&amp;diff=435&amp;oldid=prev"/>
		<updated>2019-04-15T08:57:57Z</updated>

		<summary type="html">&lt;p&gt;صفحه‌ای تازه حاوی «{{زیرصفحه توضیحات}} &amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [...» ایجاد کرد&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحهٔ تازه&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{زیرصفحه توضیحات}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[ویکی‌پدیا:ویکی‌داده]]) --&amp;gt;&lt;br /&gt;
This template tests whether the first unnamed parameter is not an empty string and returns it if it is not empty. Otherwise it returns the second unnamed parameter.&lt;br /&gt;
&lt;br /&gt;
This is useful when the first parameter is a &amp;lt;nowiki&amp;gt;{{#invoke: }}&amp;lt;/nowiki&amp;gt; of a Lua module that may return a value or nothing. Because it uses the &amp;lt;nowiki&amp;gt;{{#invoke: }}&amp;lt;/nowiki&amp;gt; just once, it simplifies the coding of infoboxes, for example.&lt;br /&gt;
&lt;br /&gt;
The optional third and fourth unnamed parameters provide a prefix and a suffix for the first parameter when returned. This enables the designer to construct more complex templates that still only use one invoke of a Lua module.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
; {{Wikidata entity link|P26}} for {{Wikidata entity link|Q151973}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}|unmarried}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}|unmarried}}&lt;br /&gt;
&lt;br /&gt;
; {{Wikidata entity link|P26}} for {{Wikidata entity link|Q905}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}|unmarried}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}|unmarried}}&lt;br /&gt;
&lt;br /&gt;
=== Prefix and suffix ===&lt;br /&gt;
==== Infobox field with microformat ====&lt;br /&gt;
A value in an infobox can be designed to be wrapped in a microformat if the wikidata call is not empty:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{If then show| {{#invoke:WikidataIB | getValue | rank=best |P19 |name=birth_place |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|}}} |noicon={{{noicon|}}} | {{{birth_place|}}} }} || &amp;lt;span class=&amp;quot;birthplace&amp;quot;&amp;gt; | &amp;lt;/span&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: If there is a local parameter supplied in the article (e.g. {{پارا|birth_place|London}}), the code will return &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;birthplace&amp;quot;&amp;gt;London&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
: If there is no local parameter it will attempt to fetch a value for {{Wikidata entity link|P19}} from Wikidata.&lt;br /&gt;
: If that has a value, such as &amp;quot;New York&amp;quot;, the code will return &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;birthplace&amp;quot;&amp;gt;New York&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
: If there is no value returned from Wikidata, the code returns nothing.&lt;br /&gt;
&lt;br /&gt;
==== Table ====&lt;br /&gt;
A table can be designed to display a row only when a particular property of the article exists on Wikidata.&lt;br /&gt;
&lt;br /&gt;
; {{Wikidata entity link|P26}} for {{Wikidata entity link|Q151973}}&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:15em;&amp;quot; | Label&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:36em;&amp;quot; | Value&lt;br /&gt;
{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}||&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{{#invoke:WikidataIB|getLabel|P26|qid=Q151973}}&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;|&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: →&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:15em;&amp;quot; | Label&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:36em;&amp;quot; | Value&lt;br /&gt;
{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q151973|fwd=ALL|osd=no}}||&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{{#invoke:WikidataIB|getLabel|P26|qid=Q151973}}&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;|&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; {{Wikidata entity link|P26}} for {{Wikidata entity link|Q905}}&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:15em;&amp;quot; | Label&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:36em;&amp;quot; | Value&lt;br /&gt;
{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}||&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{{#invoke:WikidataIB|getLabel|P26|qid=Q905}}&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;|&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: →&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:15em;&amp;quot; | Label&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width:36em;&amp;quot; | Value&lt;br /&gt;
{{If then show|{{#invoke:WikidataIB|getValue|P26|qid=Q905|fwd=ALL|osd=no}}||&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{{#invoke:WikidataIB|getLabel|P26|qid=Q905}}&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;|&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
; [[Template:Ifnoteq then show]] : tests whether the first unnamed parameter is equal to the second unnamed parameter and returns the third unnamed parameter if it does. Otherwise it returns the first unnamed parameter. This is useful when the first parameter is a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; of a Lua module that returns a value for which a specific exception is required.&lt;br /&gt;
; [[Template:If then wikilink]] : tests whether the first unnamed parameter is not an empty string and if it isn't, it returns the parameter formatted as piped wiki-link using an optional namespace prefix.&lt;br /&gt;
; [[Template:Formatter link]] : takes an external identifier code as {{پارا|code}} and uses a formatter url as {{پارا|url}} to construct a link to the external resource, which uses the code as display.&lt;br /&gt;
; [[Template:Emptyor]] : tests a piece of text to ascertain whether it's effectively empty or contains some text. If the unnamed parameter consists only of html tags, punctuation (e.g. Wiki-markup) and whitespace, then Emptyor returns nothing; otherwise it returns the parameter unchanged. Wrapper for p.emptyor function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[رده:الگو:If-then-else]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>dezfulwiki&gt;Hanooz</name></author>
	</entry>
</feed>