Check this company infobox on Microsoft wiki page on the right hand side
at https://en.wikipedia.org/wiki/Microsoft
Clearly it has parameter website with value as www.microsoft.com
but when I try to see its wiki source code. I dont see any reference to this key value pair. Why is that? Is it autocalculated?
After subsidiary it has directly footnote section as follows.
| subsid = [[List of mergers and acquisitions by Microsoft|List of Microsoft subsidiaries]]
| footnotes ={{cite web|url=http://www.microsoft.com/en-us/Investor/annual-reports.aspx|title=Microsoft Corporation Annual
What am I missing here
If a Wikipedia article doesn't specify a value for the website (or homepage) parameter, the infobox_company template will try to retrieve this data from Wikidata.
It does this by using the {{#property}} parser function and querying for the value of the official website (P856) property on the Wikidata item that's linked to the article on which the infobox appears.
So, in order for this to work, an article must have a linked Wikidata item, and that item must have a value for the above property.
Related
What does it mean:
"On a page that is connected to a Wikidata item via the interwiki links, you can use the function by adding the label of the property you want in your language or the P-number of the property. The code has to be added in the wikicode.
{{#statements:member of political party}} or {{#statements:P102}} will return the "member of political party" value.
"?
As far as I understood interwiki links are simply a special kind of link, they don't act on page level and they don't modify the behaviour of the page.
https://www.wikidata.org/wiki/Wikidata:How_to_use_data_on_Wikimedia_projects#Direct_access
Every Wikipedia article can be connected to a Wikidata item. Interwiki links these days are mostly automatically generated between articles in different languages connected to the same Wikidata item. {{#statements}} and similar functions pull information from the connected Wikidata item.
Non-Wikimedia wikis do not have similar features currently; Wikidata integration requires direct database access.
I'm writing a product data API in Blueprint and I'd like to provide a link in the styleNumber parameter to a # Group Value References beneath the Resource.
## GET Details for products that match any combination of the parameters below [/productservice/products/{?language,styleNumber}]
### Product Service (Products) [GET]
+ Parameters
+ language (array[string],optional)-_One or more 2 letter language codes ([ISO 639-1](https://www.loc.gov/standards/iso639-2/php/code_list.php) format, comma separated)_
+ styleNumber (array[string],optional)-_One or more 5 digit proprietary product style IDs (comma separated) See **[Value References](#Group Value References)**._
I was able to insert a working link to an external page in the language parameter, but neither a traditional markdown on-page link nor a link to a defined html name seem to be semantically valid to Apiary. Is there a way to do this?
Try
... See [Value References](/reference/value-references)._
It has to be the path to the actual heading and not the title.
URI cannot contain spaces etc., which is why what you have isn’t designed to work. I believe #value-references is meant to work as the URI anchor, but it doesn’t work in Apiary Documentation. Perhaps a bug, but maybe design.
Let's say I have a Wikidata item QID Q19675, and want to get the name of that item in Spanish within the wikicode of an unrelated Mediawiki page.
While getting a property like P281 postal code is easy (just write {{#property:P281|from=Q19675}}), how to get the name, which for some reason is not a normal property?
Unlike this question, this time I am not looking for a REST API, but for a Mediawiki wikicode expression.
You can use the Lua function mw.wikibase.label to get the label in the local language. If you're on a wiki that has a copy of the Wikidata template Label (e.g. the English Wikipedia), you can use that directly: {{label|Q19675}}.
If you want the label in a language other than local, use mw.wikibase.entity:getLabel.
I have a page(such as: Air Canada), in page, there is a property IATA, value is "AC".
Then, in Main_Page, I used:
{{#ask: [[Category:Airline]]
| ?IATA
}}
to list. (#ask is a feature in Semantic mediawiki extension)
It can work OK.
But, if I created a redirect page(AC) to "Air Canada", then, the string "AC"(listed in Main_Page) will be changed to "Air Canada".
So, my question is how to disable this translator?
It sound to me like you should use make the property IATA use the type text (add [[Has type::Text]] to the page Property:IATA. Otherwise the wiki will assume the type page, and unless you want to have specific pages about each IATA code, separate from the airline pages, that's not what you want.
And to answer you question: You can set $smwgQEqualitySupport = SMW_EQ_NONE; in LocalSettings.php to disable the functionality you are talking of, but doing so would be quite odd from a user's point of view, as redirects are basically a kind of aliases, and if the alias works in the MediaWiki world, you want it to work in the same way in the Semantic MediaWiki world.
I'm writing template documentation for a wiki and wanted to include a working example of the template. However, I wrote the template to auto-categorize various fields and the entire template itself is also auto-categorized.
This means if I simply call on the template, it will categorize the doc page...and because the actual template page transcludes the doc page, the template page will also be categorized.
Is there a way to prevent these categories from automatically kicking in?
Something like the following should do the trick. Wrap the categorization in your template inside a parserfunction:
{{#ifeq: {{NAMESPACE}} | Help || [[Category:Some_Category]] }}
This sets the category when the template is transcluded onto a page that is not in the "Help" namespace.
Another option is to allow a parameter such as demo to avoid including the category.
If you don't mind being slightly cryptic, you could do the category in the template as {{{cat|[[Category:Some_Category]]}}}; then specifying the parameter as {{my template|cat=}} will prevent the category inclusion.
I'm not sure if I understand the question completely (what is "auto-categorize various fields"?). I am assuming here that you want to show a template "in action" on a documentation page - without attaching some categories (those categories the documentation page usually attaches to articles using this template) to the documentation page.
So
<onlyinclude>[[Category:Some_Category]]</onlyinclude>
will not do the job - as the template is in fact included. Right?
Try passing a parameter categorize=false to the template to indicate that categories are not to be attached in this case:
{{#ifeq:{{{categorize|}}}|false||[[Category:Some_Category]]}}
The double pipe after "false" means: if(categorize==false) then (empty), else [[Category:Some_Category]] - i.e. it is an equivalent construction for if(NOT(categorize==false))...
Good luck and thanks for all the fish,
Achim