| From | Sent On | Attachments |
|---|---|---|
| Vincent Massol | Oct 6, 2011 5:57 am | |
| Thomas Mortagne | Oct 6, 2011 6:02 am | |
| Denis Gervalle | Oct 6, 2011 6:22 am | |
| Anca Luca | Oct 6, 2011 6:32 am | |
| Vincent Massol | Oct 6, 2011 6:37 am | |
| Vincent Massol | Oct 6, 2011 6:47 am | |
| Denis Gervalle | Oct 6, 2011 7:20 am | |
| Vincent Massol | Oct 6, 2011 7:41 am | |
| Denis Gervalle | Oct 6, 2011 8:23 am | |
| Marius Dumitru Florea | Oct 7, 2011 2:08 am | |
| Vincent Massol | Oct 7, 2011 3:13 am | |
| Vincent Massol | Oct 7, 2011 5:16 am | |
| Marius Dumitru Florea | Oct 10, 2011 12:22 am | |
| Thomas Mortagne | Oct 10, 2011 12:31 am | |
| Denis Gervalle | Oct 10, 2011 1:12 am | |
| Guillaume Lerouge | Jan 9, 2012 8:59 am | |
| Denis Gervalle | Jan 9, 2012 9:26 am | |
| Denis Gervalle | Jan 9, 2012 9:28 am | |
| Vincent Massol | Jan 9, 2012 9:37 am | |
| Denis Gervalle | Jan 9, 2012 10:29 am | |
| Ludovic Dubost | Jan 9, 2012 10:57 am | |
| Vincent Massol | Jan 9, 2012 2:01 pm | |
| Vincent Massol | Jan 10, 2012 4:29 am | |
| Denis Gervalle | Jan 10, 2012 4:37 am | |
| Ludovic Dubost | Jan 10, 2012 5:07 am | |
| Thomas Mortagne | Jan 10, 2012 6:04 am | |
| Marius Dumitru Florea | Jan 10, 2012 9:56 am | |
| Sergiu Dumitriu | Jan 10, 2012 3:17 pm | |
| Thomas Mortagne | Jan 11, 2012 3:30 am |
| Subject: | Re: [xwiki-devs] [VOTE] New {{display}} macro and changes to the {{include}} macro | |
|---|---|---|
| From: | Denis Gervalle (dg...@softec.lu) | |
| Date: | Oct 6, 2011 6:22:18 am | |
| List: | org.xwiki.devs | |
On Thu, Oct 6, 2011 at 14:58, Vincent Massol <vinc...@massol.net> wrote:
Hi devs,
As you know in XE 3.0 we've changed the behavior for resolving local links/attachments when they're included using the {{include}} macro (they're now resolved against the included document instead of the including document).
I do not remember this change. Does not this depends on the context=new ? If you have a link to the previous discussion, it could help.
Now there might be some use cases (pretty rare IMO but they exist) where you'd want the links to be resolved against the including document. Here's a use case: you have a sheet document that references an image called image.png and you want that the including document provides it (like an Abstract in Java! ;)).
This is not rare, but this could be solved using velocity anyway.
So we've brainstormed with Thomas and here's our proposal:
* Introduce a new {{display reference="…"/}} macro. This macro will *execute* the passed reference in its own context (it'll do what {{include context="new"…}} was doing before). It'll be located in the new display module.
Does not this new macro exists already in 1.x syntax under name '#Topic' ? Was it a mistake to have not kept this one in 2.x ?
* Deprecate the "context" parameter of the {{include}} macro. The reason is that calling with context=new is not an include, it's a display. * Add a new "resolve" parameter for the {{include}} macro with possible values = "current" | "source", with a default value of "source". resolve=source means that the links/attachments are resolved against the source (ie the document being included). Using resolve=current means that you want the links/attachments resolved against the including document.
Since I have really thought it was depending on the context parameter, why use a new parameter for this ?
Pros: * Clearly separate the 2 use cases: display and include * Make the include macro simple (a single "resolve" parameter) * Use the new display module as it should be and start the direction of having displayer macros for displaying all types of entities
Note: In the future we'll also want to deprecate the "document" parameter of the include macro in favor of a more generic "reference" parameter, which will allow the macro to include other types of entities (such as an object property for ex).
Is this reference parameter already support, and is this only the deprecation for future ? Why not deprecate right now ?
WDYT?
Here's my +1
Thanks -Vincent
_______________________________________________ devs mailing list de...@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
_______________________________________________ devs mailing list de...@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs





