Difference between revisions of "Template talk:Stats table rocket fuel tanks"

From Kerbal Space Program Wiki
Jump to: navigation, search
m
 
Line 4: Line 4:
 
     return B
 
     return B
 
else:
 
else:
     return C</pre> so <nowiki>{{#if: A||C}}</nowiki> returns only something (C) if A is empty. When we remove one pipe between them C will be visible if A is not empty (what you want). — [[User:XZise|xZise]] <small>&#91;[[User talk:XZise|talk]]&#93;</small> 14:19, 28 May 2015 (UTC)
+
     return C</pre>
 +
:so <nowiki>{{#if: A||C}}</nowiki> returns only something (C) if A is empty. When we remove one pipe between them C will be visible if A is not empty (what you want). — [[User:XZise|xZise]] <small>&#91;[[User talk:XZise|talk]]&#93;</small> 14:19, 28 May 2015 (UTC)

Latest revision as of 14:19, 28 May 2015

Does anybody know, how to make the last (NCS Adapter) visible only, when adapter=Yes switched on. -NWM (talk) 01:46, 27 May 2015 (UTC)

I've done it. The {{if||A|B|C}} and {{#if: A|B|C}} work almost the same (the former saves new lines while the latter does not):
if A is not empty then:
    return B
else:
    return C
so {{#if: A||C}} returns only something (C) if A is empty. When we remove one pipe between them C will be visible if A is not empty (what you want). — xZise [talk] 14:19, 28 May 2015 (UTC)