Discuss Concepts

From semantic-mediawiki.org

Talk pages on this wiki should primarily be used to address possible mistakes as well as missing and superseded information in the documentation.
In case you are seeking support concerning individual questions, please have a look at this page. The Semantic MediaWiki user mailing list is always a good idea for seeking help.

→ Archived talk

Contents

Thread titleRepliesLast modified
Identifying what Concept a page belongs to118:25, 19 April 2022
Get property value from subobject in page of a concept108:58, 3 July 2020
<noinclude> allowed on concept page?122:27, 12 October 2018
"Dynamic queries"114:36, 2 October 2018
Inverse referencing for user pages in Concepts217:29, 3 February 2016
Inverse referencing in concepts117:27, 5 September 2012

Identifying what Concept a page belongs to

Is there currently any way to identify from viewing a page/article what Concept it belongs to? I have a series of Concepts established and trying to load widget data to an article based on what Concept it is listed in, but I cannot determine a way to extract that data. I am currently running SMW 1.7 but looking to upgrade to 1.8. Would the Has Query functionality help me?

22:08, 10 May 2013
Edited by 2 users.
Last edit: 18:25, 19 April 2022

{{#ask: [[{{FULLPAGENAME}}]] [[Concept:Participants]] }} added on a page will return {{FULLPAGENAME}} if the page belongs to that concept. Note: take care to configure appropriate limits to get all results of a concept.

17:43, 18 April 2022
 

Get property value from subobject in page of a concept

There is a glossary where articles are splitted on some pages. Each article has some properties. The task is to search all articles where property1 = some_value and return property2. For example search for articles about people and return there names. Such task works perfectly if the glossary articles are each on their own separate page, but I can not find the way how to make it work for subpages, i.e. when there are several articles on one page.

The concept works. It applies filter as follows:

{{#concept: [[Category:Glossary]] [[Glossary term has type::Person]]
 | All pages from the Glossary with articles about people
}}

Request to a single page works as well:

{{#arraydefine: arr
 |{{#ask:
  [[-Has subobject::Glossary/A-Ak]] [[Glossary term has type::Person]]
  |?Name
  |mainlabel=-
  |searchlabel=
  |headers=hide
  |format=ul
  |sep=@
 }}
 |@
 |unique, sort=asc
}}
{{#arrayprint: arr| <br/>}}

But how to make it works for all pages in concept? The following does not work:

{{#ask:
  [[Concept:Glossary articles about people]]
  |?Name
  |mainlabel=Name
  |headers=plain
  |format=table
}}
07:25, 3 July 2020

You might want to post this question on stackoverflow. see https://stackoverflow.com/questions/tagged/semantic-mediawiki

08:58, 3 July 2020
 

<noinclude> allowed on concept page?

I'd like to add some documentation to my concept pages as I do for templates and properties. Can I use the usual tags like <noinclude> or <includeonly> on a concept page? Or must the concept page only contain the actual SMW query?

10:10, 12 October 2018

I'd say yes. It should work to add these transclusion tags.

22:27, 12 October 2018
 

"Dynamic queries"

In a way, "Dynamic queries" implies that the construction of the query itself is dynamic, i.e, its restrictions, formatting parameters, etc, can be passed to it as parameters at run time to the query construct, i.e the "Concept" in SMW terms, which is great to have, but as far as I understand is not the case so far.

The results of the query are generally expected to by "dynamic", and that is what is in fact meant here by "dynamic queries" so maybe this needs to be addressed, or simply, "dynamic queries" is not used in this context. Perhaps "modular" queries would be a better description?

08:59, 1 October 2018

As far as I can see the docu talks about dynamic categories and this is spoken in a crude way, what it is.

14:36, 2 October 2018
 

Inverse referencing for user pages in Concepts

I'm trying to generate a list of contributors to a particular effort that I can leverage for a type-ahead field of a form. I thought the best route to go would be to create a Concept. I'm runming SMW 2.1 and have Extra Special Properties 1.3.1, so I am trying a Concept page that looks something like this:

{{#concept:
[[-Page creator.FOO PROPERTY::+]]
| Effort contributors.
}}

With "FOO Property" being a property present on all the pages within my effort. I have gotten this inverse property method to work on Concepts that do not reference user pages, but for some reason, when I save the concept the query shown on the Concept page reverts to:

{{#concept:
[[Page creator.FOO PROPERTY::+]]
| Effort contributors.
}}

without the inverse - and I receive no results. This same inverse query works fine on the Special:Ask page, so I am curious if this is a limitation of Concepts?

20:44, 27 January 2016

> I'm runming SMW 2.1 and have Extra Special Properties 1.3.1, so I am trying a Concept page that looks something like this:

SMW 2.1 is no longer maintained.

> without the inverse - and I receive no results. This same inverse query works fine on the Special:Ask page, so I am curious if this is a limitation of Concepts?

[0, 1] describes some test cases and a fix with [2] containing a corresponding example.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1096

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0204.json

[2] http://sandbox.semantic-mediawiki.org/wiki/Concept:InversePageCreatorLastEditorIs

22:40, 27 January 2016

Thank you so much. Great information and example!

17:29, 3 February 2016
 
 

Inverse referencing in concepts

Hi folks,

inverse referencing in concepts is not available at the moment. Right? Is it planned to get this feature also for concepts?

Cheers, -Rolze (talk) 15:30, 5 September 2012 (CEST)

14:30, 5 September 2012

Hi Rolze, you should send this to the developer mailing list. They will not see this post here. Cheers

17:27, 5 September 2012