Template:Has short description: Difference between revisions
From The Kristen Barry Archive
Templates>MusikBot II m Protected "Template:Has short description": High-risk template or module (more info) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) |
m 1 revision imported |
(No difference)
|
Latest revision as of 19:37, 2 June 2025
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
Warning | This template is used on approximately 766,000 pages, or roughly 82632% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
File:Lua-Logo.svg | This template uses Lua: |
Convenience template that returns the position of the phrase {{short description
within the article wiki-text, or nothing if the phrase does not exist.
It can take an optional parameter |title=
(or the first unnamed parameter) which is the title of the page to test. The title defaults to the current page if not supplied.
Usage
Examples:
{{Has short description |title=Loyola Academy}}
→{{Has short description |title=Rock Bridge High School}}
→
It is directly useable in tests within templates like {{#if:{{Has short description}} |Something when short description exists |Something when short description doesn't exist}}
.
It may find use in infoboxes that generate short descriptions (with categories, etc.), where it is desirable to suppress the generated short description if one already exists.