Difference between revisions of "Template:Discussion"

(notes are what this does)
(attempt at next version)
Line 1: Line 1:
{{#if:{{{1|}}}
+
{{#switch: {{{1|}}}
 
|
 
|
<div class="NavHead" style="padding-left:1em; background:#F5E10F;">Discussion</div>
+
| "replace this text with any discussion" =
 +
| <div class="NavHead" style="padding-left:1em; background:#F5E10F;">Discussion</div>
 
<div class="NavContent">{{{1|}}}</div>
 
<div class="NavContent">{{{1|}}}</div>
|
 
 
}}<noinclude>
 
}}<noinclude>
 
This template works for <nowiki>{{Discussion|}}</nowiki> where there is not discussion, and thus returns no discussion header (blank), and for <nowiki>{{Discussion|Here is the discussion}}</nowiki> which returns both the show/hide discussion header and the discussion itself.
 
This template works for <nowiki>{{Discussion|}}</nowiki> where there is not discussion, and thus returns no discussion header (blank), and for <nowiki>{{Discussion|Here is the discussion}}</nowiki> which returns both the show/hide discussion header and the discussion itself.

Revision as of 01:31, 19 November 2007

This template works for {{Discussion|}} where there is not discussion, and thus returns no discussion header (blank), and for {{Discussion|Here is the discussion}} which returns both the show/hide discussion header and the discussion itself.

The next version should work just the same, but also return blank for {{Discussion|"replace this text with any discussion"}} perhaps by using the #switch function instead of #if.