⧼social-icons-mobile-buttons⧽

Template:PersonRemote: Difference between revisions

From Tsadra Commons
(Connections panel: a name with no page renders as plain text, not a red link)
Tag: Reverted
(Revert: #ifexist runs on commons, so it tests the wrong wiki for a consuming wiki)
Tag: Manual revert
 
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 201: Line 190:
|,
|,
|@@@
|@@@
|<span class="person-connections-item">{{#ifexist::Category:@@@|[[:Category:@@@|@@@]]|@@@}}</span>
|<span class="person-connections-item">[[:Category:@@@|@@@]]</span>
|
|
}}</div></div>
}}</div></div>
Line 209: Line 198:
|,
|,
|@@@
|@@@
|<span class="person-connections-item">{{#ifexist::Category:Translators of @@@|[[:Category:Translators of @@@|@@@]]|@@@}}</span>
|<span class="person-connections-item">[[:Category:Translators of @@@|@@@]]</span>
|
|
}}</div></div>
}}</div></div>
Line 217: Line 206:
|,
|,
|@@@
|@@@
|<span class="person-connections-item">{{#ifexist:@@@|[[@@@]]|@@@}}</span>
|<span class="person-connections-item">[[@@@]]</span>
|
|
}}</div></div>
}}</div></div>
Line 225: Line 214:
|,
|,
|@@@
|@@@
|<span class="person-connections-item">{{#ifexist:@@@|[[@@@]]|@@@}}</span>
|<span class="person-connections-item">[[@@@]]</span>
|
|
}}</div></div>
}}</div></div>
Line 233: Line 222:
|,
|,
|@@@
|@@@
|<span class="person-connections-item">{{#ifexist:@@@|[[@@@]]|@@@}}</span>
|<span class="person-connections-item">[[@@@]]</span>
|
|
}}</div></div>
}}</div></div>

Latest revision as of 17:45, 11 September 2026