0

I've implemented a page with a long list of subojects. The properties are correctly visibile. Now I'm trying to query that list but my first query attempt doesn't work.

{{#ask:
 [[Categoria:Marco Crepaldi]]
 |?Titolo
}}

{{#ask:[[Has subobject::text property]]
 |?Titolo
}}
Revious
  • 7,816
  • 31
  • 98
  • 147
  • @IRA1777: I've managed to fix the previous issue, I will self answer my question later, but I would really appreciate some help. The next step I'd like to reach is removing the first column from the table (each cell is filled with "Tutti gli articoli di Marco Crepaldi"). Any hint? – Revious Nov 22 '22 at 13:57
  • 1
    Just add | mainlabel=- in your query – IRA1777 Nov 22 '22 at 14:15
  • @IRA1777 thanks a lot. If you don't mind may I ask you if you know how to list all the values of the tags? https://stackoverflow.com/questions/74534519/semantic-mediawiki-list-the-property-values-from-suboject – Revious Nov 22 '22 at 14:48
  • It is hard to help you further, the "special page" of your wiki is broken, I cant see what extensions and versions you are using, neither if semantic refresh jobs are running... – IRA1777 Nov 22 '22 at 16:53
  • @IRA1777: I've managed to fix the issue, I've MediaWiki 1.38.2 and Semantic MediaWiki 4.0.2 – Revious Nov 23 '22 at 08:41
  • 1
    BTW iI fixed the faulty template that prevented the correct registration of tags. It was again a typo, you have to be more careful. – IRA1777 Nov 23 '22 at 09:25
  • @IRA1777 thanks a lot you were very precious – Revious Nov 23 '22 at 12:27

1 Answers1

0

I've found the solution with the help of @IRA1777

{{#ask:
 [[-Has subobject::{{FULLPAGENAME}}]] 
 |?Tags
 |?Titolo
 | mainlabel=-
}}

MainLabel removes the first column (which was filled with the name of the page containing the subobjects)

For who understands SQL the query reads more or less as:

SELECT Tags, Titolo
FROM subobject s
WHERE s.ParentPage = {{FULLPAGENAME}}
Revious
  • 7,816
  • 31
  • 98
  • 147