I developed a patched SMWListPrinter that allows grouping results by a query
field.

Requirements:

  - The query must be sorted by the field that will be used in the
  grouping (it would help if we could sort by more than one field).
  - The groupby="field name" parameter.
  - The optional titlestyle="style string" parameter.
  - Format must be "ul", "ol" or "list". Could be applied to "table" as
  well, but I didn't do it.

If you think this is a valid contribution I will release the code.

Query sentences are like this (sorry for the use of Portuguese, but what
matters it the structure):

<ask format="ul" sort="tipo de modificação" groupby="tipo de modificação"
titlestyle="color:#cf7606; font-size:200%;">
[[Modificação do produto::Runner]]
[[tipo de modificação:=+]]
[[tipo de modificação:=*]]
[[data:=*]]
</ask>

<ask format="list" sort="tipo de modificação" groupby="tipo de modificação">
[[Modificação do produto::Runner]]
[[tipo de modificação:=+]]
[[tipo de modificação:=*]]
</ask>

Output is like this:

Correção

  - Pesquisa na árvore (SMS
313128)<http://www.benner.com.br/wiki/index.php?title=Pesquisa_na_%C3%A1rvore_%28SMS_313128%29>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-23)
  - Fernando.correia/Testes/teste de
melhoria<http://www.benner.com.br/wiki/index.php?title=Usu%C3%A1rio:Fernando.correia/Testes/teste_de_melhoria>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-23)
  - Fernando.correia/Testes/teste 2 de
melhoria<http://www.benner.com.br/wiki/index.php?title=Usu%C3%A1rio:Fernando.correia/Testes/teste_2_de_melhoria>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-23)

Melhoria

  - Propriedade de campos do tipo Filtro (SMS
314270)<http://www.benner.com.br/wiki/index.php?title=Propriedade_de_campos_do_tipo_Filtro_%28SMS_314270%29>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-16)
  - Pesquisa por datas, campo Tabela (SMS
314494)<http://www.benner.com.br/wiki/index.php?title=Pesquisa_por_datas%2C_campo_Tabela_%28SMS_314494%29>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-16)
  - Campos do tipo Grid (SMS
311933)<http://www.benner.com.br/wiki/index.php?title=Campos_do_tipo_Grid_%28SMS_311933%29>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-23)
  - Nova propriedade para compatibilidade Web (SMS
315716)<http://www.benner.com.br/wiki/index.php?title=Nova_propriedade_para_compatibilidade_Web_%28SMS_315716%29>(
  Data <http://www.benner.com.br/wiki/index.php?title=Attribute:Data>2006-11-23)

or

Correção Pesquisa na árvore (SMS
313128)<http://www.benner.com.br/wiki/index.php?title=Pesquisa_na_%C3%A1rvore_%28SMS_313128%29>,
Fernando.correia/Testes/teste de
melhoria<http://www.benner.com.br/wiki/index.php?title=Usu%C3%A1rio:Fernando.correia/Testes/teste_de_melhoria>,
Fernando.correia/Testes/teste 2 de
melhoria<http://www.benner.com.br/wiki/index.php?title=Usu%C3%A1rio:Fernando.correia/Testes/teste_2_de_melhoria>
Melhoria

Propriedade de campos do tipo Filtro (SMS
314270)<http://www.benner.com.br/wiki/index.php?title=Propriedade_de_campos_do_tipo_Filtro_%28SMS_314270%29>,
Pesquisa por datas, campo Tabela (SMS
314494)<http://www.benner.com.br/wiki/index.php?title=Pesquisa_por_datas%2C_campo_Tabela_%28SMS_314494%29>,
Campos do tipo Grid (SMS
311933)<http://www.benner.com.br/wiki/index.php?title=Campos_do_tipo_Grid_%28SMS_311933%29>e
Nova
propriedade para compatibilidade Web (SMS
315716)<http://www.benner.com.br/wiki/index.php?title=Nova_propriedade_para_compatibilidade_Web_%28SMS_315716%29>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to