Hi,
On Wed, Aug 25, 2010 at 04:01, Radek Rekas <[email protected]> wrote:
>
> Is it possible to include a page and have it execute as if it was still in
> that space (rather than in the parent pages space)?
>
>
> For example I have a News space and its WebHome page looks for documents with
> news post objects in that space.
>
>
> When I include News.WebHome from Main.WebHome it only sees news posts that
> are in the Main space rather than in the News space.
With {{include}} macro you have a context handling parameters which is
used to indicate what is the current document when including the
document:
* context="current" is the default and basically mean that the
included document (News.WebHome) content is executed in the context of
the includer document (Main.WebHome)
* context="new" means that the included document (News.WebHome) is
executed in a new isolated context in which it's the current document,
i.e. it renders exactly like you where going to /bin/view/News/
See http://code.xwiki.org/xwiki/bin/view/Macros/IncludeMacro20 for more.
>
>
> Many thanks
>
> Radek Rekas
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
--
Thomas Mortagne
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users