By: Rafael
Date: 2015-03-12
Time: 11:43
|
Can't get to mergeblock succesfully with ODT documentHello
I have an array created with this values (this is a print_r result): ( [0] => Array ( [nombre] => AYUNTAMIENTO DE SAN PEDRO [nbop] => DESCOMENTAR [date] => 7 de Marzo de 2006 [registro] => 1031/2006 [numero_recibo] => 0900001 [organismo] => JUZGADOS [asunto] => Notificación [date_abono] => 0 de de [importe] => 0,00 € [fecha_actual] => 12 de Marzo de 2015 ) [1] => Array ( [nombre] => AYUNTAMIENTO DE BB [nbop] => DESCOMENTAR [date] => 8 de Marzo de 2006 [registro] => 1296/2006 [numero_recibo] => 0610001 [organismo] => AYUNTAMIENTO DE AA [asunto] => Aprobación [date_abono] => 1 de Noviembre de 2006 [importe] => 0,00 € [fecha_actual] => 12 de Marzo de 2015 ) [2] => Array ( [nombre] => EMPRESA 1 [nbop] => DESCOMENTAR [date] => 8 de Marzo de 2006 [registro] => 1175/2006 [numero_recibo] => [organismo] => AYUNTAMIENTO DE CC [asunto] => Notificación de la aprobación [date_abono] => 0 de de [importe] => 0,00 € [fecha_actual] => 12 de Marzo de 2015 ) And this PHP code after that array is declared:
Finally I have a one page, without pagebreaks, ODT document with something like this: [bloque.nombre] Se publica la inserción número [bloque.registro] (recibo número [bloque.numero_recibo]), ordenada por [bloque.organismo] relativa a: “[bloque.asunto]” IMPORTE: [bloque.importe] But the result ODT is only a one page document with the first values of the array, instead a document with multiple pages (mail merge). What am I doing wrong? Thank you |
|
By: Skrol29
Date: 2015-03-12
Time: 12:17
|
Re: Can't get to mergeblock succesfully with ODT documentHi Rafael,
« If no block's definition is found in the template, then the MergeBlock() method will merge the first record with all linked fields found in the template. » http://www.tinybutstrong.com/manual.php#php_mergeblock You have to add parameter "block=tbs:page" in one of your TBS fields. |
|
By: Rafael
Date: 2015-03-13
Time: 10:21
|
Re: Can't get to mergeblock succesfully with ODT documentHi again
I added ";block=tbs.page" to the last TBS field on my ODT document. That is:
But same result!!! However, if I put that string in de penultimate TBS field ("bloque.asunto" is this case), TBS show me an error: TinyButStrong Error in block's definition [bloque.asunto...]: at least one tag corresponding to tbs.page is not found. Check opening tags, closing tags and embedding levels. TinyButStrong Error Show() Method: The output is cancelled by the OpenTBS plugin because at least one error has occured. I'm lost at this point :( |
|
By: Rafael
Date: 2015-03-13
Time: 12:54
|
Re: Can't get to mergeblock succesfully with ODT documentSolved. Your solution was fine. I was using a "." instead ":". Was my fault.
THANK YOU |