<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://bsd.neuroinf.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%3AIfnotempty</id>
	<title>テンプレート:Ifnotempty - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://bsd.neuroinf.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%3AIfnotempty"/>
	<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Ifnotempty&amp;action=history"/>
	<updated>2026-05-30T11:32:37Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Ifnotempty&amp;diff=29406&amp;oldid=prev</id>
		<title>Nijcadmin: 1版</title>
		<link rel="alternate" type="text/html" href="https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Ifnotempty&amp;diff=29406&amp;oldid=prev"/>
		<updated>2015-03-14T03:15:38Z</updated>

		<summary type="html">&lt;p&gt;1版&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{{{{|safesubst:}}}{{{{{|safesubst:}}}#if:{{{1}}}|p1|p2}}|{{{2}}}|{{{3|}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;div class=&amp;quot;template-documentation&amp;quot; style=&amp;quot;margin-top:1em;&amp;quot;&amp;gt;{{#if:defaultnotblank|&amp;lt;div style=&amp;quot;padding-bottom:3px; border-bottom:1px solid #aaa; margin-bottom:1ex;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:150%&amp;quot;&amp;gt;Documentation&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;}}&lt;br /&gt;
{{Documentation subpage}}&lt;br /&gt;
With this template [[mw:Help:Extension:ParserFunctions|#if]] can be used in a way such that it does not [[Help:Newlines_and_spaces#Stripping_on_expansion|strip spaces and newlines]] from the &amp;quot;then&amp;quot; and &amp;quot;else&amp;quot; part. For evaluating the condition spaces and newlines are stripped like with ParserFunctions.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ifnotempty|x| p | q }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; gives &amp;quot;{{ifnotempty|x| p | q }}&amp;quot;&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ifnotempty|| p | q }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; gives &amp;quot;{{ifnotempty|| p | q }}&amp;quot;&lt;br /&gt;
Compare:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#if:x| p | q }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; gives &amp;quot;{{#if:x| p | q }}&amp;quot;&lt;br /&gt;
Note that, unlike parser functions, templates require writing equals signs in values of unnamed parameters as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For full substitution, simply use {{cnw|subst:}} or {{cnw|safesubst:}}. If the condition contains a parser function, template, or variable, that should be substituted too. Optionally the &amp;quot;then&amp;quot; or &amp;quot;else&amp;quot; part can also be substituted.&lt;br /&gt;
&lt;br /&gt;
==Expansion depth limit==&lt;br /&gt;
13 levels allowed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|a}}}}}}}}}}}}}}}}}}}}}}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; gives {{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|a}}}}}}}}}}}}}}}}}}}}}}}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|a}}}}}}}}}}}}}}}}}}}}}}}}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; gives {{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|{{ifnotempty|x|a}}}}}}}}}}}}}}}}}}}}}}}}}}}}&lt;br /&gt;
&lt;br /&gt;
==Internal technical details==&lt;br /&gt;
For evaluating the condition the template uses the actual parser function; however, not directly with p and q, because this strips spaces and newlines from the result, but with index values 1 and 2. The result can be 1, 2. The template with the applicable name is called ([[Template:P1]] or  [[Template:P2]]), with as parameters p and q.&lt;br /&gt;
&lt;br /&gt;
==Conditions==&lt;br /&gt;
===#if:===&lt;br /&gt;
&lt;br /&gt;
Condition: string not empty.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Template:If]]&lt;br /&gt;
{{refs}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;[[Category:Branching templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nijcadmin</name></author>
	</entry>
</feed>