Unfortunately, I never worked with n-arys yet, but I heard there are some limitations regarding querying them, I hope somebody else will be able to help.


On Sat, Jun 21, 2008 at 4:10 AM, Vladislav Novikov <vladislav.novikov@gmail.com> wrote:
Sergey, thank you very much.
I thought in the same direction.
I did it without "|link=none" option.
Just ignoring the first template parameter.
It's not so clean solution. We will need to add additional obvious property: page name.
If the first parameter to the template was a string instead of link, templates would have much more flexibility. Don't you think?
Another question.
We want to convert "display name" property to a n-ary property.
Something like this: (display name;language).
Since I can not call parser functions from the query template, I don't see any possibility to get proper display name of the proper language.
Here I created an example:
Query for simple property:
{{#ask: [[Test]]
  | ?
  | ?Page_name=
  | ?Display_name_ru=
  | format=template
  | template=QueryDisplayNameOutput
Query for n-ary property:
{{#ask: [[Test]] [[Dspl lng::?;ru]]
  | ?
  | ?Page_name=
  | ?Dspl lng=
  | format=template
  | template=QueryDisplayNameOutput
Get all Dspl lng values:
{{#ask: [[Dspl lng::?;ru]] [[Test]]
  | ?Dspl lng=
The Test page semantic:
[[Dspl lng::Pushkin;en]]
[[Dspl lng::Пушкин;ru]]
Any ideas? 

On Sat, Jun 21, 2008 at 12:10 AM, Sergey Chernyshev <semediawiki-devel@antispam.sergeychernyshev.com> wrote:
I think a solution to your problem might be in using "|link=none" in #ask call and using your own formatting template where you can use returned value to construct your own links (instead of the links constructed by #ask query itself when link=none is not specified).

This will obviously need for your #ask query to return the property you want to use in a link along with page title.

Hope this will work for you.


P.S. What a set of coincidences, I was leading original development of first Russian Jewish portal Jewish.ru back in a day and our web dev studio was called Novikov Design ;)

On Thu, Jun 12, 2008 at 8:11 AM, Vladislav Novikov <vladislav.novikov@gmail.com> wrote:
Hi all,

I asked this question on developer mail list, maybe this list is a more proper place for it.

Here is the short question:
We want to replace a page name, in a link part of query results with some property of the same page.

Is there any native mechanism for it? Any hooks?
Is there any possibility to alter the visible part of the link?

The more detail description:

We are building jewish semantic genealogical portal (JewAge).
The site will support different languages (Russian, Hebrew, English,...). 
We want to provide the possibility to the people from different countries with different spoken languages to discover common family roots and to share information about it.
So we want that one single page, that represent a person, to hold all semantic information about this person. For example, his name in different languages.

Here is the example of the page:

Here is the question.
We want links from query results, to display it's display name in specific language instead of it's page name.

Any hooks? Any ideas?

Thanks a lot.

---------- Forwarded message ----------
From: Vladislav Novikov <vladislav.novikov@gmail.com>
Date: Sat, May 31, 2008 at 1:23 AM
Subject: hook on query result
To: semediawiki-devel@lists.sourceforge.net

Hi all,
Is there any hooks on the qurey results?
We have some property, Display name, we want to print this property value instead of the page name in the qurey results.
How can we do it?

Sergey Chernyshev