Closed theopensourcerer closed 4 years ago
Your subblock should be in the scope of the main block. I assume that the using of the subblock is outside the zone of main block (it is two different rows of same table).
I've made a small change but still not getting any data rendered in the sub block:
If you are sure that the subblock falls within the coverage area of the parent block, then you should make sure that the marker does not contain an excess markup due to copy-paste. To do this, copy the marker text into notepad, and then copy back from there to the template. It often helped me.
yay!!! Thanks for that! :-D
I'm on Linux so I put the template directives into gedit and pasted them back in.
@theopensourcerer by the way, if you need some things (for example, sorting or grouping with calculations), you can watch my fork. There, however, the documentation and examples are very bad, but the additional functionality allows me to generate accounting documents, invoices, sort different lists without changing the php code.
I am trying to create a template in LibreOffice Writer that uses subblocks. I can get the first-level block working but not the second?
The data is in a php array and is in a format like this (which I took from the example in the main docs re: "Automatic subblocks". So what I want to achieve is a table with rows by "moduleName" within each row contains another table of values for the label, name and value from the fieldData array:
I've tried various forms of the subblock template directive (I tried replacing ".val" with .label, .name and .value obviously) but can never get it to display any data in the rendered document. Here is the relevant part of the template:
And this is what gets rendered:
Any ideas? Thanks.