Hi James,

you can try this, works fine in similar case for me:

1) Create the ask string in php like this:

/$search = "{{#ask: <whatever you want here, i have VARs here too>}}";/

2) Create the result string which you can manipulate later:

$resultString = $parser->mStripState->unstripBoth($parser->recursiveTagParse( $/search/, $frame ),$parser->mStripState);

Greetings

Frank


On 01.11.2014 19:18, James Montalvo wrote:
I'm creating a parser function in which I'm going to include an ask query. In this particular case I'd like it just return a normal HTML table of results, as if I were to do:

{{#ask: [[Category:Some category]]
|? Property 1
|? Property 2
| limit = 10
| sort = Property 2
}}

Once I understand this I'll probably have cases where I need to modify the results of the query before passing it to a result formatter or formatting the results manually. What is the best way to do this using existing SMW methods?

Thanks,
James


------------------------------------------------------------------------------


_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

------------------------------------------------------------------------------
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to