Selecting pages that have the same value set for a property

From semantic-mediawiki.org

On the page for a movie (directed by a director) I would like to display a list of other movies directed by the same director. I.e. other pages in the category:Movies that have the same value set for the property:Directed by.

{{#ask: [[Directed by::{{#show: {{PAGENAME}}| ?Directed by}}]] [[Category:Movies]] |limit=10 |format=datatable }}

The above example produces a datatable with other movies directed by the same director, but it also outputs a warning (caused by the |-sign probably... WARNING: part "" of query not understood, may cause unexpected results...). Is there a better way for doing this?

Regards, Martin

23:33, 8 October 2012

Try ?Directed by#-.

But I think that querying itself is a bad idea. Better use [[Directed by::{{{Whatever_template_parametre_for_director}}}]].

03:45, 9 October 2012

Thanks

17:08, 13 October 2012
 

What do you mean by {{{Whatever_template_parametre_for_director}}}. Indeed, I have the same request but I don't know how to do.

I have a public proposal linked to Themes. For example, a proposal page :"Give an house to all people" with links to Themes "Human Rights" and "Economy" (property = Proposal-Themes) and I want to see all the other proposals related to the same Themes (in this case "Human Rights" and "Economy").

When I try to list with the primary "ask" as describe by Martinwiss, I get parsing errors like :

The part "|Human Rights" of the query was not understood. Results might not be as expected. The part "," of the query was not understood. Results might not be as expected. The part "|Economy" of the query was not understood. Results might not be as expected. The part "," of the query was not understood. Results might not be as expected. The part "]]" of the query was not understood. Results might not be as expected.

12:42, 2 February 2013

Of course, you have to process the parametre before passing it to a query, if it is a list or contains wiki markup. I do it with regular expressions.

16:40, 2 February 2013