On Sun, Oct 23, 2011 at 12:27 AM, Ashtar Communications
ashtarcommunicati...@gmail.com wrote:
Thank you for the feedback - I have been playing with passing custom
parameters, and have a few additional clarification questions.
It seems that I need to use pure wiki syntax if I want the TOC macro
to work right. I am currently relying on the {{html}} macro for two
things which I can't figure out how to replace with custom parameters:
1) Nested ul's - I can only get the custom parameter to apply to one
line, and can't figure out how to nest another ul.
Something like this:
(% class=mktree name=tree %)
* $doc.display(Title, $obj)
velocity code, including an {{html}} block to create an input element
**Additional parts of tree
***Additional parts of tree
Just returns two different ul's, only the first one of which has the
custom parameter. Is this because the additional lines of code before
continuing the tree forces the rendering engine to close the first
ul? Any way to override that?
Here is an example of wiki syntax with custom parameters on each ul:
(% param=value %)
* toto
(% param2=value2 %)
** titi
but custom parameters on li is not supported yet.
2) Table Sorter - Unfortunately, the whole set of object display code
is wrapped in an {{html}} macro because I am using the old Table
Sorter extension code. This is because I want to display multiple
properties from each object in a single table cell. Looking at the
Live Table macro, it seems that it only supports binding a table to a
class and then setting a column to display a single property - where I
need a single cell to include multiple properties displayed using
custom code.
Accomplishing this using the html syntax is simple - I can include an
arbitrary amount of code in each td tag.
To use wiki syntax for a sortable table, the XWiki Syntax document
says I should use this:
(% class=grid sortable filterable doOddEven id=tableid %)
(% class=sortHeader %)|=Title 1|=Title 2
|Cell 11|Cell 12
|Cell 21|Cell 22
This creates the table fine - but I can't figure out how to include
additional multi-line code in a single cell. As soon as I put in a new
line, etc...it closes the table. Is there any way to accomplish this
using wiki syntax? Should I be trying to use LiveTable instead
somehow?
You can put as many lines you want without closing the table but it's
closed by an empty line. If you need to have several paragraphs you
can use group syntax
(http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HGroups) as
in
(% class=grid sortable filterable doOddEven id=tableid %)
(% class=sortHeader %)|=Title 1|=Title 2
|Cell 11|(((
Cell 12
with
several
paragraphs
)))|Cell 21|Cell 22
If the above is confusing, here's what I'm really asking:
I want to use a sortable table to display multiple objects of the same
class on the same page. I would like that table to display multiple
properties of each object in certain cells in the row. Some of those
properties will contain wiki syntax - which I would like to be
readable by the TOC macro after the table has been rendered. Is there
a way to accomplish this?
Thank you,
Aaron
On Thu, Oct 20, 2011 at 1:18 PM, Ashtar Communications
ashtarcommunicati...@gmail.com wrote:
Interesting - I had missed the ability to pass custom parameters using
wiki syntax. I will play with that and see if I can get it to output
the same html I need.
I am in fact using a series of nested ul within each div, that
forms a collapsible javascript tree. The js is touchy about the exact
formatting of the UL - if I can't get the tags to nest correctly using
wiki syntax then I may be back with additional questions.
A more accurate but simplified version of each object's display code is:
ul class=tree
li
h2some content/h2
input /
input /
/li
ul
liSome velocity code, returns wiki syntax with headings/li
liSome velocity code, returns wiki syntax with headings/li
liSome velocity code, returns wiki syntax with headings/li
/ul
/ul
Thanks much,
aaron
On Thu, Oct 20, 2011 at 12:52 PM, Thomas Mortagne
thomas.morta...@xwiki.com wrote:
On Thu, Oct 20, 2011 at 7:10 PM, Ashtar Communications
ashtarcommunicati...@gmail.com wrote:
That makes sense, thank you for the clarification. Unfortunately, I am
using the HTML macro to generate the final output - this is because I
need to use ul's with a javascript to make the div's into
collapsible trees.
Does that mean I'm out of luck?
ul ? I don't see much lists in your example, did you mean div ?
You can get div with custom parameters in pure wiki syntax the following
way:
(% class=somecssclass %)
(((
div content
)))
which produces
div class=somecssclassdiv content/div
And if you really mean list, list most of the wiki elements list
support custom parameters too:
(% class=somecssclass %)
* mylist element 1
* mylist element 2
which produces
ul class=somecssclass
limylist