On Dec 16, 2010, at 11:51 AM, Thomas Mortagne wrote: > On Thu, Dec 16, 2010 at 11:42, Vincent Massol <[email protected]> wrote: >> Hi devs, >> >> I'd like to propose a new macro (not sure how to call it): {{current}} >> >> Usage: >> >> {{current document="wiki:space.page"}} >> .... nested blocks.... >> {{/current}} >> >> What it does: >> >> * Execute the nested blocks in the context of the passed document, i.e. it >> sets the passed document as the current document in the execution context. > > So that means "current" macro will execute itself the transformations > for its content ? What would be the priority of "current" macro in > this case ?
hmmm, hadn't thought of this... Since we need to reset the previous current doc, it would need to execute its content indeed. Re priority, it would need to be high priority to allow nesting high priority macros in it probably... Any better idea to fulfill the use case below? Good points... Thanks -Vincent >> Rationale: >> >> * We have several use cases: >> ** When we have an include and we want to use relative references (links, >> images) in the included document >> ** On the Features page of enterprise.xwiki.org I query extensions.xwiki.org >> and get the data from one object field which has the format: "attach:...." >> (or "url:....", etc). I need to make this an image that is resolved based on >> the page where the information was taken from. >> >> WDYT? >> >> Thanks >> -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

