I'm trying to create tables in xwiki, having the row contents defined through
INCLUDE macros (so that I can construct the table dynamically).
* I've gone through the documentation - but cannot find the info I need, OR
* I'm just not clever enough to understand it. :(
Any help getting me started would be appreciated.
I first tried this first using HTML macro tags - which didn't work well. Other
documentation pointed me to scripting through velocity - which seemed promising
as it also had the advantage of letting me embed more logic. Current version
I'm trying is:
{{velocity}}
<table border="1" width="90%">
<tr>
<th>Field name</th>
<th>Definition</th>
</tr>
{{include document="Metadata.row_def_x"/}}
{{include document="Metadata.row_def_y"/}}
{{include document="Metadata.row_def_z"/}}
</table>
{{/velocity}}
Each row definition macro consists solely of the HTML table row definition:
For example:
<tr>
<td width="20%">Copper</td>
<td>A shiny red-pink metal.</td>
</tr>
This now lets me correctly generate the HTML table code, BUT problem is that
viewing the generated wiki page just shows the HTML code - not the table I
wanted to see. I've tried other variations using {{html}} then embedding
include macros within that, and (alternatively) trying to build tables directly
in XWiki's own table code ... but those attempts didn't work either.
|=Metric Name|=Definition
{{include document="Metadata.row_def_x"/}}
{{include document="Metadata.row_def_y"/}}
{{include document="Metadata.row_def_z"/}}
Where row definition macro was in format:
|Copper | A shiny red-pink metal.
This successfully included the lines - but inserted them all in the header.
**********************************************************************
This e-mail contains confidential information which is intended only for the
use of the named addresses/s. If you as recipient are not a named addressee,
then you must not in any manner whatever disseminate or copy any part of this
e-mail, or use or disclose any of its contents. Please would you notify us
immediately by reply e-mail and then delete the message from your system.
Please be aware, any opinions or views expressed in this email, do not
necessarily represent the views of the Company
**********************************************************************
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users