Hello, I don't know if it is the place to discuss issues, or if I should put the following as comment of the issue in jira, but ... I can put it afterwards in jira. I thought about it, and imagined that only way around, would be to assign a different "id" to the column elements added by each different {{container}} macro. For example the following: {{container}} ...3 columns... {{/container}} {{container}} ...2 columns... {{/container}} Would generate html : <div class="container-columns" id="container1"> ... columns... </div> <div class="container-columns" id="container2"> ...columns... </div> columns css would be injected twice with: ..../columns.css?columns=3&id=container1 ..../columns.css?columns=2&id=container2 (but I don't know if it's even possible to inject it twice with same name and different params as currently it's not the case) (*) In CSS column width would be computed from number of columns, and selector changed to: #${request.id}.container-columns .column { ...} WDYT ? 2 problems I see are: - point (*) above - generate automatically an id for the container (and how ?) like "containerN", or force passing a new parameter "id" to the container macro (or maybe syntax (% id=... %) could work ?) BR, Jeremie 2014-03-05 17:25 GMT+01:00 Jeremie BOUSQUET <[email protected]>:
Thanks Vincent,
I created a JIRA for it: http://jira.xwiki.org/browse/XWIKI-10118
I nailed the problem maybe, but I didn't nail the solution :) Doesn't seem so easy ...
BR, jeremie
2014-03-05 17:03 GMT+01:00 [email protected] <[email protected]>:
Hi Jeremie,
I think it's Anca who coded this container macro so I don't know the details but it looks like a bug indeed.
I'd file a jira issue if I were you since it seems like you nailed the problem :)
Thanks -Vincent
On 5 Mar 2014 at 16:55:30, Jeremie BOUSQUET ([email protected] (mailto:[email protected])) wrote:
Hello,
I have a weird issue with {{container}} macro in xwiki 4.5.2. If I want to display 3 columns, like this for example:
{{container layoutStyle="columns"}} ((( a ))) ((( b ))) ((( c ))) {{/container}}
It shows content over only 2 columns like this: a b c
... instead of expected: a b c
After having a look at the source :
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-4.5.2/xwiki-plat...
... I think I understand the problem. It seems a limitation of container macro, is that it injects
columns.css in
the page with number of columns as parameter. So if you add more than one {{container}} to the same page, they can't have a different number of columns ... For instance in my case I used the container macro in a Panel, with 2 columns - so I can never add more than 2 columns in other locations. I removed the columns from the Panel, and now my 3-columns are correctly displayed :)
If you agree I could fill a Jira for this (I searched quickly, didn't find it already described)
Thanks, Jeremie _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users