<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>http://www.chuuren.fr/w/index.php?action=history&amp;feed=atom&amp;title=Mod%C3%A8le%3AIfnotempty</id>
		<title>Modèle:Ifnotempty - Historique des versions</title>
		<link rel="self" type="application/atom+xml" href="http://www.chuuren.fr/w/index.php?action=history&amp;feed=atom&amp;title=Mod%C3%A8le%3AIfnotempty"/>
		<link rel="alternate" type="text/html" href="http://www.chuuren.fr/w/index.php?title=Mod%C3%A8le:Ifnotempty&amp;action=history"/>
		<updated>2026-09-13T14:41:23Z</updated>
		<subtitle>Historique pour cette page sur le wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://www.chuuren.fr/w/index.php?title=Mod%C3%A8le:Ifnotempty&amp;diff=482&amp;oldid=prev</id>
		<title>Simon : Page créée avec « &lt;includeonly&gt;{{{{{|safesubst:}}}{{{{{|safesubst:}}}#if:{{{1}}}|p1|p2}}|{{{2}}}|{{{3|}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;&lt;div class=&quot;template-documentation&quot; style=&quot;margin-top:1em... »</title>
		<link rel="alternate" type="text/html" href="http://www.chuuren.fr/w/index.php?title=Mod%C3%A8le:Ifnotempty&amp;diff=482&amp;oldid=prev"/>
				<updated>2015-09-23T11:19:17Z</updated>
		
		<summary type="html">&lt;p&gt;Page créée avec « &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... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&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>Simon</name></author>	</entry>

	</feed>