Template:PersonRemote: Difference between revisions
From Tsadra Commons
(VSCode edit) |
(Connections panel: a name with no page renders as plain text, not a red link) Tag: Reverted |
||
| Line 168: | Line 168: | ||
splits on comma. | splits on comma. | ||
-->{{#if: {{{ AltNamesTib | }}}{{{ AltNamesWylie | }}}{{{ AltNamesOther | }}}{{{ PersonType | }}}{{{ Languagetranslation | }}}{{{ EmanationOf | }}}{{{ Studentof | }}}{{{ Teacherof | }}} | -->{{#if: {{{ AltNamesTib | }}}{{{ AltNamesWylie | }}}{{{ AltNamesOther | }}}{{{ PersonType | }}}{{{ Languagetranslation | }}}{{{ EmanationOf | }}}{{{ Studentof | }}}{{{ Teacherof | }}} | ||
|<div class="person-connections my-5 shadow-sm">{{#if: {{{ AltNamesTib | }}}{{{ AltNamesWylie | }}}{{{ AltNamesOther | }}} | |<!-- | ||
Every link in this panel is wrapped in #ifexist: a name that has no | |||
page renders as plain text rather than a red link. These lists are | |||
fetched from a shared record, so most wikis hold pages for only a | |||
fraction of the people named -- a panel of red was reporting a gap in | |||
the reader's wiki, not a fact about the person. | |||
#ifexist is an expensive parser function, capped at 300 per page. The | |||
longest list measured is 33 names, and a page shows a handful of rows, | |||
so this stays well inside the cap -- but check before adding a row. | |||
--> | |||
<div class="person-connections my-5 shadow-sm">{{#if: {{{ AltNamesTib | }}}{{{ AltNamesWylie | }}}{{{ AltNamesOther | }}} | |||
|<div class="person-connections-row"><div class="person-connections-label">Also known as</div><div class="person-connections-items tws-capped" data-cap="6" data-items=".person-connections-item" data-noun="names"><!-- | |<div class="person-connections-row"><div class="person-connections-label">Also known as</div><div class="person-connections-items tws-capped" data-cap="6" data-items=".person-connections-item" data-noun="names"><!-- | ||
Tibetan is emitted separately from the transliterated names so it can carry | Tibetan is emitted separately from the transliterated names so it can carry | ||
| Line 190: | Line 201: | ||
|, | |, | ||
|@@@ | |@@@ | ||
|<span class="person-connections-item">[[:Category:@@@|@@@]]</span> | |<span class="person-connections-item">{{#ifexist::Category:@@@|[[:Category:@@@|@@@]]|@@@}}</span> | ||
| | | | ||
}}</div></div> | }}</div></div> | ||
| Line 198: | Line 209: | ||
|, | |, | ||
|@@@ | |@@@ | ||
|<span class="person-connections-item">[[:Category:Translators of @@@|@@@]]</span> | |<span class="person-connections-item">{{#ifexist::Category:Translators of @@@|[[:Category:Translators of @@@|@@@]]|@@@}}</span> | ||
| | | | ||
}}</div></div> | }}</div></div> | ||
| Line 206: | Line 217: | ||
|, | |, | ||
|@@@ | |@@@ | ||
|<span class="person-connections-item">[[@@@]]</span> | |<span class="person-connections-item">{{#ifexist:@@@|[[@@@]]|@@@}}</span> | ||
| | | | ||
}}</div></div> | }}</div></div> | ||
| Line 214: | Line 225: | ||
|, | |, | ||
|@@@ | |@@@ | ||
|<span class="person-connections-item">[[@@@]]</span> | |<span class="person-connections-item">{{#ifexist:@@@|[[@@@]]|@@@}}</span> | ||
| | | | ||
}}</div></div> | }}</div></div> | ||
| Line 222: | Line 233: | ||
|, | |, | ||
|@@@ | |@@@ | ||
|<span class="person-connections-item">[[@@@]]</span> | |<span class="person-connections-item">{{#ifexist:@@@|[[@@@]]|@@@}}</span> | ||
| | | | ||
}}</div></div> | }}</div></div> | ||