Editing
Template:Infobox/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Hiding headers when all its data fields are empty ==== You can also make headers automatically hide when their section is empty (has no data-row showing). Consider this situation: {{Infobox | title = Example: header with & without data | headerstyle = background: lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow: auto;"> {{Infobox | title = Example: header with & without data | headerstyle = background: lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight> {{clear}} If you want hide the header when no {{para|data''N''}} values are present, use {{para|autoheaders|y}}: {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background: lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow: auto;"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background: lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight> {{clear}} So, header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next visible content. Note: if the data has empty css elements, like {{para|data|2=<span style="background:yellow;"></span>}}, this will be treated as non-empty (having data). If {{para|autoheaders|y}} but there are items that you {{em|do not}} want to trigger a header, place {{para|headerX|_BLANK_}}. This will serve as an empty header and separate it from the subsequent items. {{Infobox | title = Example: blank header with & without data | autoheaders = y | headerstyle = background: lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} <syntaxhighlight lang="wikitext" style="overflow: auto;"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background: lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} </syntaxhighlight> {{clear}}
Summary:
Please note that all contributions to Mirrorplay: Fae are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
MPFae:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information