On Wed, May 22, 2013 at 6:15 PM, Valdis Vītoliņš <[email protected]> wrote:
Thomas, problem is that I don't want to put included content in a cell. Instead I'd like to continue table in the new row. E.g. as following table: |aa|aa |bb|bb |cc|cc |dd|dd
with |cc|cc |dd|dd part included from the other document.
I tried also different groupings, e.g.: (((|aa|aa |bb|bb {{include reference="Test.TableIncl"/}}))) what includes table in the cell, or (((|aa|aa |bb|bb)))((({{include reference="Test.TableIncl"/}}))) which starts new table, etc.
It seems to me, including referenced document provides implicit grouping ~ like ((({{include reference="Test.TableIncl"/}})))
Ok I did not understood your use case, you can't continue a table using include macro. The table is parsed before the include macro is executed and you get the include macro either in a cell or in a new standalone block.
In other word the table structure has to be complete before it's parsed. You will have to use scripting to do what you want but there is no way to do it with include macro.
So, this means that only way I can do it, is using macro in another page and then invoke it from main page, e.g.
In TableIncl page: {{velocity}} #macro(remainingtable) |cc|cc |dd|dd #end {{/velocity}}
In Main page: {{include reference="Test.TableIncl"/}} {{velocity}} |aa|aa |bb|bb #remainingtable() {{/velocity}}
Valdis
That would work yes (but you should separate the include and velocity macros as otherwise they will be in a paragraph) but there is plenty of other ways (you could for example get the document content and print it as if it was generated by your script), it all depends on your precise use case. In TableIncl page: |cc|cc |dd|dd In Main page: {{velocity}} |aa|aa |bb|bb $xwiki.getDocument('TableIncl').content {{/velocity}} -- Thomas Mortagne