Discussion:
Question to format=tree
(too old to reply)
Ralf Hagenbuck
2017-06-26 13:59:28 UTC
Permalink
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?
planetenxin
2017-06-26 15:09:32 UTC
Permalink
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
Post by 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
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com
Ralf Hagenbuck
2017-06-28 08:52:05 UTC
Permalink
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.
Post by planetenxin
Hi,
[[{{{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
Post by 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
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
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Loading...