getSiteLink for Commons
[edit]
- Was informed by someone at Wikipedia, is commonswiki . --Traveler100 (talk) 17:08, 20 January 2018 (UTC)
get site link from qid (i.e. not current page)
[edit]Would like to get the wikipedia page of another page that the current wikivoyage page. However what works on wikipedia does not work here. For example: {{#invoke:Wikidata|getSiteLink|enwiki|qid=Q327162}}. Is there another method or can this module be updated? --Traveler100 (talk) 13:11, 11 November 2018 (UTC)
- The code for getSiteLink was different at en.wikipedia, so I've copied over the version from wikipedia and tested and it's working now. Example: European route E40 -- WOSlinker (talk) 13:37, 11 November 2018 (UTC)
- great, thanks.--Traveler100 (talk) 14:04, 11 November 2018 (UTC)
Single value
[edit]Would like to get one (the best) image from wikidata P18. With {{#invoke:Wikidata|getValueFromID|Q1223508 |P18|FETCH_WIKIDATA}} I get multiple values.
- Ohrid from Samuel's Fortress 2.jpg
is there another option or a different module command that just returns one image file name?--Traveler100 (talk) 11:02, 15 January 2019 (UTC)
- Module:WikidataIB works better for this, with its maxvals parameter.
- {{#invoke:WikidataIB|getValue|P18|fwd=ALL|osd=no|noicon=true|qid=Q1223508|maxvals=1}}
- Ohrid from Samuel's Fortress 2.jpg
- ARR8 (talk | contribs) 14:04, 15 January 2019 (UTC)