openTo attr of documentTree macro DO NOT work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

openTo attr of documentTree macro DO NOT work

kirbyzhou
Xwiki-7.3

For example:
My page hierarchy looks like:

Sandbox.WebHome
        TestPage1
        TestPage2
        TestPage3
                SubPage1
                SubPage2
                SubPage3
                        SubPage3-1

I want to create a tree open to 'SubPage2'

So the tree should like:
*Sandbox.WebHome
** TestPage1
** TestPage2
** TestPage3
*** SubPage1
*** SubPage2
*** SubPage3



I have a lot of code such like:

{{documentTree root="space:Sandbox" showRoot="false" showTranslations="false" hierarchyMode="parentchild" openTo="document:Sandbox.SubPage1"/}}

{{documentTree root="space:Sandbox" showRoot="false" showTranslations="false" hierarchyMode="parentchild" openTo="document:Sandbox.TestPage3.SubPage1"/}}


But none of it works; the tree view user seen is always NOT expanded! It has just one level:

*Sandbox.WebHome


My user have to expand the tree hand by hand.

Anyone can help me?








_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: openTo attr of documentTree macro DO NOT work

Marius Dumitru Florea
This works for me:

{{documentTree hierarchyMode="parentchild" showTranslations="false"
root="document:xwiki:Sandbox.WebHome" openTo="document:Sandbox.SubPage2" /}}

This too:

{{documentTree hierarchyMode="parentchild" showTranslations="false"
showSpaces="true" root="space:xwiki:Sandbox"
openTo="document:Sandbox.SubPage2" /}}

Note that the root must be specified as absolute reference for now, see
http://jira.xwiki.org/browse/XWIKI-12909 . As for the value of openTo, you
need to check what is the actual reference of the "SubPage2". It depends on
how you created it. Check the path in the URL, after the /view/ segment.
You may have to suffix ".WebHome" if you create SubPage2 as non-terminal
page (default behaviour in XWiki 7.2+).

Hope this helps,
Marius

On Mon, Dec 14, 2015 at 5:12 AM, KirbY ZhoU <[hidden email]> wrote:

> Xwiki-7.3
>
> For example:
> My page hierarchy looks like:
>
> Sandbox.WebHome
>         TestPage1
>         TestPage2
>         TestPage3
>                 SubPage1
>                 SubPage2
>                 SubPage3
>                         SubPage3-1
>
> I want to create a tree open to 'SubPage2'
>
> So the tree should like:
> *Sandbox.WebHome
> ** TestPage1
> ** TestPage2
> ** TestPage3
> *** SubPage1
> *** SubPage2
> *** SubPage3
>
>
>
> I have a lot of code such like:
>
> {{documentTree root="space:Sandbox" showRoot="false"
> showTranslations="false" hierarchyMode="parentchild"
> openTo="document:Sandbox.SubPage1"/}}
>
> {{documentTree root="space:Sandbox" showRoot="false"
> showTranslations="false" hierarchyMode="parentchild"
> openTo="document:Sandbox.TestPage3.SubPage1"/}}
>
>
> But none of it works; the tree view user seen is always NOT expanded! It
> has just one level:
>
> *Sandbox.WebHome
>
>
> My user have to expand the tree hand by hand.
>
> Anyone can help me?
>
>
>
>
>
>
>
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: openTo attr of documentTree macro DO NOT work

kirbyzhou
Thanks very much.
It works for me now!





在 15/12/15 上午12:35,“users 代表 Marius Dumitru Florea”<[hidden email] 代表 [hidden email]> 写入:

>This works for me:
>
>{{documentTree hierarchyMode="parentchild" showTranslations="false"
>root="document:xwiki:Sandbox.WebHome" openTo="document:Sandbox.SubPage2" /}}
>
>This too:
>
>{{documentTree hierarchyMode="parentchild" showTranslations="false"
>showSpaces="true" root="space:xwiki:Sandbox"
>openTo="document:Sandbox.SubPage2" /}}
>
>Note that the root must be specified as absolute reference for now, see
>http://jira.xwiki.org/browse/XWIKI-12909 . As for the value of openTo, you
>need to check what is the actual reference of the "SubPage2". It depends on
>how you created it. Check the path in the URL, after the /view/ segment.
>You may have to suffix ".WebHome" if you create SubPage2 as non-terminal
>page (default behaviour in XWiki 7.2+).
>
>Hope this helps,
>Marius
>
>On Mon, Dec 14, 2015 at 5:12 AM, KirbY ZhoU <[hidden email]> wrote:
>
>> Xwiki-7.3
>>
>> For example:
>> My page hierarchy looks like:
>>
>> Sandbox.WebHome
>>         TestPage1
>>         TestPage2
>>         TestPage3
>>                 SubPage1
>>                 SubPage2
>>                 SubPage3
>>                         SubPage3-1
>>
>> I want to create a tree open to 'SubPage2'
>>
>> So the tree should like:
>> *Sandbox.WebHome
>> ** TestPage1
>> ** TestPage2
>> ** TestPage3
>> *** SubPage1
>> *** SubPage2
>> *** SubPage3
>>
>>
>>
>> I have a lot of code such like:
>>
>> {{documentTree root="space:Sandbox" showRoot="false"
>> showTranslations="false" hierarchyMode="parentchild"
>> openTo="document:Sandbox.SubPage1"/}}
>>
>> {{documentTree root="space:Sandbox" showRoot="false"
>> showTranslations="false" hierarchyMode="parentchild"
>> openTo="document:Sandbox.TestPage3.SubPage1"/}}
>>
>>
>> But none of it works; the tree view user seen is always NOT expanded! It
>> has just one level:
>>
>> *Sandbox.WebHome
>>
>>
>> My user have to expand the tree hand by hand.
>>
>> Anyone can help me?
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>_______________________________________________
>users mailing list
>[hidden email]
>http://lists.xwiki.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users