Re: [xwiki-users] How to continue table in new row with content from referenced document

2013-05-22 Thread Thomas Mortagne
On Wed, May 22, 2013 at 6:15 PM, Valdis Vītoliņš  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
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to continue table in new row with content from referenced document

2013-05-22 Thread Valdis Vītoliņš
> > 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



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to continue table in new row with content from referenced document

2013-05-22 Thread Thomas Mortagne
On Wed, May 22, 2013 at 5:11 PM, Valdis Vītoliņš  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.

>
> Valdis
>
>> On Wed, May 22, 2013 at 3:43 PM, Valdis Vītoliņš  
>> wrote:
>> > I'd like to continue table from main document with content from
>> > referenced document, but can't get it right.
>> >
>> > I have TableIncl document:
>> > |cc|cc
>> > |dd|dd
>> >
>> > And then I use following:
>> > |aa|aa
>> > |bb|bb
>> >  {{include reference="Test.TableIncl"/}}
>> > I get table from TableIncl shown inside bb cell.
>> > If I put empty line, then new table is started.
>> >
>> > Any suggestions?
>> > Valdis
>> >
>> > ___
>> > users mailing list
>> > users@xwiki.org
>> > http://lists.xwiki.org/mailman/listinfo/users
>>
>> You can use group syntax to put anything you want in a table cell
>> (same for lists).
>>
>> See http://www.xwiki.org/xwiki/bin/view/XWiki/XWikiSyntax#HGroups
>>
>> --
>> Thomas Mortagne
>
>



--
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to continue table in new row with content from referenced document

2013-05-22 Thread Valdis Vītoliņš
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"/}})))

Valdis

> On Wed, May 22, 2013 at 3:43 PM, Valdis Vītoliņš  
> wrote:
> > I'd like to continue table from main document with content from
> > referenced document, but can't get it right.
> >
> > I have TableIncl document:
> > |cc|cc
> > |dd|dd
> >
> > And then I use following:
> > |aa|aa
> > |bb|bb
> >  {{include reference="Test.TableIncl"/}}
> > I get table from TableIncl shown inside bb cell.
> > If I put empty line, then new table is started.
> >
> > Any suggestions?
> > Valdis
> >
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> 
> You can use group syntax to put anything you want in a table cell
> (same for lists).
> 
> See http://www.xwiki.org/xwiki/bin/view/XWiki/XWikiSyntax#HGroups
> 
> --
> Thomas Mortagne


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to continue table in new row with content from referenced document

2013-05-22 Thread Thomas Mortagne
On Wed, May 22, 2013 at 3:43 PM, Valdis Vītoliņš  wrote:
> I'd like to continue table from main document with content from
> referenced document, but can't get it right.
>
> I have TableIncl document:
> |cc|cc
> |dd|dd
>
> And then I use following:
> |aa|aa
> |bb|bb
>  {{include reference="Test.TableIncl"/}}
> I get table from TableIncl shown inside bb cell.
> If I put empty line, then new table is started.
>
> Any suggestions?
> Valdis
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users

You can use group syntax to put anything you want in a table cell
(same for lists).

See http://www.xwiki.org/xwiki/bin/view/XWiki/XWikiSyntax#HGroups

--
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] How to continue table in new row with content from referenced document

2013-05-22 Thread Valdis Vītoliņš
I'd like to continue table from main document with content from
referenced document, but can't get it right.

I have TableIncl document:
|cc|cc
|dd|dd

And then I use following:
|aa|aa
|bb|bb
 {{include reference="Test.TableIncl"/}}
I get table from TableIncl shown inside bb cell.
If I put empty line, then new table is started.

Any suggestions?
Valdis

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users