Question to format=tree

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Question to format=tree

Ralf Hagenbuck-2
I tried format=tree today. My usecase is very similar to the exmaple on https://www.semantic-mediawiki.org/wiki/Help:Tree_format

At least my pages have parent-pages wich have further parent-pages themselves. But how to get only a part of the tree or more precisely the part of the tree that contain page on wich the #ask query is on.


According to the example  on page Germany I want only Germany and the lower hits within the tree. Or on page Stuttgart I want onlythe upper hits upto Germany within the tree.

Is this possible?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question to format=tree

planetenxin
Hi,

here's an example how we do it:

{{#ask:
  [[{{{1|}}}]]
  OR
  [[Category:Team]]
  [[Part Of Team::{{{1|}}}]]
  |format=tree
  |mainlabel=
  |parent=Part Of Team
  |limit=5000
  |sort=Display title of
  |offset=0
}}

This will show a tree on a page {{{1}}} with all children of that page.

/Alexander

Am 26.06.2017 um 15:59 schrieb Ralf Hagenbuck:

> I tried format=tree today. My usecase is very similar to the exmaple on https://www.semantic-mediawiki.org/wiki/Help:Tree_format
>
> At least my pages have parent-pages wich have further parent-pages themselves. But how to get only a part of the tree or more precisely the part of the tree that contain page on wich the #ask query is on.
>
>
> According to the example  on page Germany I want only Germany and the lower hits within the tree. Or on page Stuttgart I want onlythe upper hits upto Germany within the tree.
>
> Is this possible?
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>


--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question to format=tree

Semantic Mediawiki - User mailing list
The tree format takes all results from the query and arranges them in a tree. There is two ways of filtering this down:
1. Make sure that your #ask query really only returns the results in the subtree that you are interested in.
2. use the |root= parameter, e.g. |root={{PAGENAME}} should return the subtree starting at the current page.
Stephan

> -------- Original Message --------
> Subject: Re: [Semediawiki-user] Question to format=tree
> Local Time: June 26, 2017 5:09 PM
> UTC Time: June 26, 2017 3:09 PM
> From: [hidden email]
> To: [hidden email]
> Hi,
> here"s an example how we do it:
> {{#ask:
> [[{{{1|}}}]]
> OR
> [[Category:Team]]
> [[Part Of Team::{{{1|}}}]]
> |format=tree
> |mainlabel=
> |parent=Part Of Team
> |limit=5000
> |sort=Display title of
> |offset=0
> }}
> This will show a tree on a page {{{1}}} with all children of that page.
> /Alexander
> Am 26.06.2017 um 15:59 schrieb Ralf Hagenbuck:
>> I tried format=tree today. My usecase is very similar to the exmaple on https://www.semantic-mediawiki.org/wiki/Help:Tree_format
>>
>> At least my pages have parent-pages wich have further parent-pages themselves. But how to get only a part of the tree or more precisely the part of the tree that contain page on wich the #ask query is on.
>>
>>
>> According to the example on page Germany I want only Germany and the lower hits within the tree. Or on page Stuttgart I want onlythe upper hits upto Germany within the tree.
>>
>> Is this possible?
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world"s most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>
> --
> ________________________________________________
> semantic::apps by gesinn.it
> Business Applications with Semantic Mediawiki.
> http://semantic-apps.com
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world"s most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question to format=tree

Ralf Hagenbuck-2
In reply to this post by planetenxin
Yes, thanks for that Example. This is somthing similar to what I found out meanwhile. But it does not all things I hoped for.

Especially It does not show up pages that are parents or grandparents of the current page, nor it does not show the sidearms of pages that are parents or grandparents of the current page.

For getting at least the parent-pages of the current page I added this befor the #ask -tree:

{{#if:{{{1|}}}
|{{#ask:[[{{{1|}}}]]|format=ul|mainlabel=-}}
|no parent-page
}}

In my case the current page does not ''know'' about what is the root-page of the tree or how many generations are above it I hoped the tree -format could trigger this out.

>
>     planetenxin <[hidden email]> hat am 26. Juni 2017 um 17:09 geschrieben:
>
>     Hi,
>
>     here's an example how we do it:
>
>     {{#ask:
>     [[{{{1|}}}]]
>     OR
>     [[Category:Team]]
>     [[Part Of Team::{{{1|}}}]]
>     |format=tree
>     |mainlabel=
>     |parent=Part Of Team
>     |limit=5000
>     |sort=Display title of
>     |offset=0
>     }}
>
>     This will show a tree on a page {{{1}}} with all children of that page.
>
>     /Alexander
>
>     Am 26.06.2017 um 15:59 schrieb Ralf Hagenbuck:
>
>         > >
> >         I tried format=tree today. My usecase is very similar to the exmaple on https://www.semantic-mediawiki.org/wiki/Help:Tree_format
> >
> >         At least my pages have parent-pages wich have further parent-pages themselves. But how to get only a part of the tree or more precisely the part of the tree that contain page on wich the #ask query is on.
> >
> >         According to the example on page Germany I want only Germany and the lower hits within the tree. Or on page Stuttgart I want onlythe upper hits upto Germany within the tree.
> >
> >         Is this possible?
> >
> >         ------------------------------------------------------------------------------
> >         Check out the vibrant tech community on one of the world's most
> >         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >
> >         _______________________________________________
> >         Semediawiki-user mailing list
> >         [hidden email]
> >         https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
> >     >
>     --
>
>     ________________________________________________
>     semantic::apps by gesinn.it
>     Business Applications with Semantic Mediawiki.
>     http://semantic-apps.com
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>     _______________________________________________
>     Semediawiki-user mailing list
>     [hidden email]
>     https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Loading...