SID-02295: Get the "Grandparent" of a topic
| Status: |
Answered |
TWiki version: |
6.0.0 |
Perl version: |
v5.10.0 |
| Category: |
CategorySearch |
Server OS: |
Suse Linux Enterprise Server 11 SP1 |
Last update: |
9 years ago |
I have the following structure of topics (If I show it in Treeview):
Application1
...+-- ProvServ1
......+-- EsbServ1
...+-- ProvServ2
......+-- EsbServ2
......+-- EsbServ3
Application2
...+-- ProvServ3
......+-- EsbServ4
In the Topics "EsbServ1" and "EsbServ2" is a Link to Application2
With a nested search as discribed in the "Formattedsearch"-Topic I get the Infomation, that "Application2" is referenced by "EsBServ1" and "EsbServ2".
So far so well.
But I needed to know the "Grandparent" of EsbServ1 and EsbServ2 - that is "Application1", because the Question is "Which applications are neccessary, that Application2 can work?".
Is there a way to get the Grandparent in the nested search results, so it looks like
Application2 is referenced by:
Application1-EsbServ1, Application1-EsbServ2
Or is there any other way to get the needed information? i.e. an "nested"
%PARENTTOPIC{topic="%PARENTTOPIC{topic="EsbServ1"}%"}%
--
Peter Starek - 2017-02-01
Discussion and Answer
Yes, you can nest
PARENTTOPIC. Alternatively get first the full breadcrumb with a
META:
%META{ "parent" nowebhome="on" format="$topic" separator=", " }%
You can wrap that in a
CALCULATE SpreadSheetPlugin formula to get the second last item of the comma-list.
--
Peter Thoeny - 2017-02-01
Thank you
--
Peter Starek - 2017-02-28
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.