Help talk:Count format

Jump to: navigation, search

Using format=count together with intro/outro

Just picked up the example from bugzilla using the intro and outro parameter.

{{#ask: [[Property::Value]] 
|format = count
|intro  = Found:   
|outro  =  results:
  is used as space character

null parameter

What do you think about adding some kind of null parameter to count? The ide is that if nothing is found (count=0) the text in the null parameter will be used. It can be helpful in the following scenarios: 1. We want to make count pretty and add some special text in case nothing is found.

|null= No one

In fact in those cases several parameter would be useful: for 0 and 1 counts. pre>0found</pre> 2. We want to use count in {{#if function}}: in that case it will be null= Yury Kaktov (talk) 04:03, 5 August 2012 (CEST)


Thread titleRepliesLast modified
Bad number of pages count in a category410:37, 8 March 2016

Bad number of pages count in a category


I'm trying to get the actual number of pages which are in a category with following query :

{{#ask: [[Category:a category]] |format=count}}

Unfortunately, the results includes redirected pages and thus is superior to the right result expected.

How can I exclude redirected pages from this query ?


Nicolas NALLET (Sémantiki)14:57, 8 December 2015

It seems to work here [0] (unless I have misunderstand the issue).


mwjames (talk)15:22, 8 December 2015

I have also seen it on one particular query, [0] suggests a patch and it would be great if you could apply/test/verify this before we make an effort to push this into the master branch.


mwjames (talk)06:26, 9 December 2015

Ok thanks MWJames, I'm trying this patch soon and tell you if it's working.

Nicolas NALLET (Sémantiki)10:54, 11 December 2015

Sorry for the late reply. Unfortunately the patch did'nt fix the problem. I will test with SMW 2.4 when available.


Nicolas NALLET (Sémantiki)10:37, 8 March 2016