Semantic MediaWiki {{#ask}} - how to show source value instead "redirect name"?

StackOverflow https://stackoverflow.com/questions/22162240

  •  19-10-2022
  •  | 
  •  

문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top