create new tag
, view all tags

SID-00137: Is there a way to list all the child topics in a parent topic

Status: Answered Answered TWiki version: 4.2.3 Perl version:
Category: CategoryTemplates Server OS: Debian Linux 3.1 Last update: 1 year ago

Hi, I have all the topics in my web with appropriate topic parents. Now in every parent topic I would like to list all the child topics linking to this particular topic automatically at the end of the page or beginning of the page. It will be easier to browse through the list of child topics every time we visit a page.

Can some one please let me know if there is any way to do this?

Thanks in advance.

-- RaghuKiran - 26 Feb 2009

Discussion and Answer

Try something like (not tested):

format="   * $topic"

-- MartinKaufmann - 26 Feb 2009

To get that search to appear on every topic, I suggest you look at TWikiTemplates. In particular, the section entitled "TMPL:INCLUDE recursion for piecewise customisation, or mixing in new features" shows how to customize the standard templates in a way that that will protect your change the next time you patch or upgrade.

-- SeanCMorgan - 26 Feb 2009

Is there any way to list topic of a particular web which are created by user on a particular subject ? The code %TOPICLIST{" * $web.$name"}%, is listing all unnecessary topic like user list and other system related topics along with subject related topic.

The code bellow also not giving me only the list subject related topic.

%SEARCH{"META\:TOPICPARENT.*\"%BASETOPIC%\"" type="regex" nonoise="on" format=" * $topic" }%

I need to list only subject related topic created by the user. Hope my question is clear. Please help



-- Basab Bijoy - 2017-03-30

There's a lot that can be done to tweak a search, and quite a list of features was not available when this support question was brought up the first time. So let's start from the basics to the more sophisticated things:

  • Say you're interested in topics on the subject "Hoinarylup" in the Sandbox web. If the particular subject you're looking for is just a word which occurs in the text, simply do:
    %SEARCH{"Hoinarylup" web="Sandbox"}%
  • The user list and similar topics which describe TWiki users only occurs in the Main web. The usual "administrative" topics can easily be excluded from search like this:
    %SEARCH{"Hoinarylup" web="Sandbox" excludetopic="Web*"}%
  • A lot more control can be achieved with QuerySearch (see in particular the "Examples" section over there). So, if you want to find all topics which have 'WebHome' as their parent topic and contain 'Hoinarylup', do:
    %SEARCH{"parent.name='WebHome' AND text ~ '*Hoinarylup*'" type="query" web="Sandbox" excludetopic="Web*"}%

FindingStuff shows the results for these examples. They're all the same results because there are not too much topics on this subject yet. For more information, see VarSEARCH and QuerySearch and, if you want to do fancy formatting of the results, FormattedSearch.

-- Harald Jörg - 2017-03-30

      Change status to:
ALERT! 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.
Status Answered
Title Is there a way to list all the child topics in a parent topic
SupportCategory CategoryTemplates
TWiki version 4.2.3
Server OS Debian Linux 3.1
Web server Apache
Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2017-03-30 - HaraldJoerg
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.