ADVERTISEMENT
Template:If
From Hellgatewiki.com
Contents |
Template informations
- This is temporary IF function, because standard parser function does not work.
Examples
Basic usage
If Param1 is set, write Param1:
{{If
|{{{Param1|}}}
|{{{Param1}}}
}}
Modify table
This is example for templates, where you want add columns, or rows to tables. In this function you cant use standard pipe ("|") to create tables. For some parsing reasons u must replace it with template {{!}}. Small example which create new row in table for tested parameter will be:
{{if |{{{Power Cost|}}}| -- if parameter "Power Cost" is set
{{!}}- -- add new row to table
{{!}}'''[[Power|Power Cost]]''' -- add first column (parameter name)
{{!}}{{{Power Cost}}} -- add second column (parameter value)
}} -- close if template
Bug: For some unknown reasons its not possible to set properties for columns ( {{!}}border="0"{{!}}{{{Power Cost}}} does not work ).
Advanced usage
Will be documented soon :)
