Transcluding People Pages on Other Wikis: Difference between revisions
((by SublimeText.Mediawiker)) |
((by SublimeText.Mediawiker)) |
||
Line 7: | Line 7: | ||
===Template:PersonCall=== | ===Template:PersonCall=== | ||
<pre> | <pre> | ||
{{#get_web_data:url=https://commons.tsadra.org/index.php | |||
?title=Special%3AAsk | |||
&q=[[{{{PAGENAMEE}}}]] | |||
&po=MainNameTib%0A | |||
MainNamePhon%0A | |||
YearBirth%0A | |||
YearDeath%0A | |||
TibDateGender%0A | |||
TibDateElement%0A | |||
TibDateAnimal%0A | |||
TibDateRabjung%0A | |||
BdrcLink%0A | |||
TolLink%0A | |||
HarLink%0A | |||
Images | |||
&p[format]=csv | |||
&p[sep]=, | |||
|format=csv with header | |||
|data= | |||
translatorlibwiki=translatorlibwiki, | |||
citation=citation, | |||
frontcoverimg=frontcoverimg | |||
}} | |||
<div class="yellow-box depth-2 transBox" style="margin-top: 30px; overflow: auto;"> | |||
<div class="yellow-box-header"><i class="fa fa-language" aria-hidden="true"></i> Translation of Volume</div> | |||
<div class="transImg" style="float: right; margin-left: 7px;">[[{{#external_value:frontcoverimg}}|link=http://library.tsadra.org/index.php/{{urlencode:{{{drlPageTitleOfTrans}}}|WIKI}}]]</div> | |||
<div class="plainlinks" style="font-size: large;">[http://library.tsadra.org/index.php/{{urlencode:{{{drlPageTitleOfTrans}}}|WIKI}} {{{drlPageTitleOfTrans}}}]</div> | |||
''by {{#arraymap:{{#external_value:translatorlibwiki}}|;|@@@|[[@@@]]|, }}'' | |||
''{{#external_value:citation}}'' | |||
[[/Introduction|Read the book's introduction <i class="fa fa-align-left" aria-hidden="true"></i>]] | |||
</div> | |||
</pre> | </pre> |
Revision as of 12:47, 1 February 2018
This wiki is setup so that data from the people pages here can be included in other wikis. This allows for us to only need to create and maintain a person's page once and in one place.
Now, in order to include this data on a different wiki, you will need to create a template that first queries for the information on this wiki here, and then displays it appropriately in the receiving wiki.
I have created a standard template here that can be adapted as needed for each wiki on which it is used.
Template:PersonCall
{{#get_web_data:url=https://commons.tsadra.org/index.php ?title=Special%3AAsk &q=[[{{{PAGENAMEE}}}]] &po=MainNameTib%0A MainNamePhon%0A YearBirth%0A YearDeath%0A TibDateGender%0A TibDateElement%0A TibDateAnimal%0A TibDateRabjung%0A BdrcLink%0A TolLink%0A HarLink%0A Images &p[format]=csv &p[sep]=, |format=csv with header |data= translatorlibwiki=translatorlibwiki, citation=citation, frontcoverimg=frontcoverimg }} <div class="yellow-box depth-2 transBox" style="margin-top: 30px; overflow: auto;"> <div class="yellow-box-header"><i class="fa fa-language" aria-hidden="true"></i> Translation of Volume</div> <div class="transImg" style="float: right; margin-left: 7px;">[[{{#external_value:frontcoverimg}}|link=http://library.tsadra.org/index.php/{{urlencode:{{{drlPageTitleOfTrans}}}|WIKI}}]]</div> <div class="plainlinks" style="font-size: large;">[http://library.tsadra.org/index.php/{{urlencode:{{{drlPageTitleOfTrans}}}|WIKI}} {{{drlPageTitleOfTrans}}}]</div> ''by {{#arraymap:{{#external_value:translatorlibwiki}}|;|@@@|[[@@@]]|, }}'' ''{{#external_value:citation}}'' [[/Introduction|Read the book's introduction <i class="fa fa-align-left" aria-hidden="true"></i>]] </div>