Tags:
create new tag
view all tags

Feature Proposal: Need Parent Topic as Variable

Motivation

There are variables that give the TOPIC name, INCLUDINGTOPIC name, and BASETOPIC name.

We need a variable for PARENTTOPIC.

Description and Documentation

PARENTTOPIC -- parent of current topic

  • Syntax: %PARENTTOPIC% or %PARENTTOPIC{ format="..." topic="..." }%
  • Expands to: FeatureRequest, renders as FeatureRequest
  • Parameters:
    Item Description Default
    format="..." Format string used to display parent topic, where $web expands to the web name, and $topic expands to the topic name. Additional formatting tokens can be used. "$topic"
    (topic name)
    topic="..." Get parent of "Topic" or "Web.Topic" "%WEB%.%TOPIC%"
    (current topic)
  • Related: META, METASEARCH, TOPIC

Examples

Impact

Implementation

-- Contributors: VickiBrown, PeterThoeny

Discussion

%META{"parent" format="$topic" dontrecurse="on"}% displays the parent of a topic: FeatureRequest

Though it's a bit of a PITA to use frown

It's not really clear to me from your description what it is you actually want. How would a variable help you "reset the parent"?

-- CrawfordCurrie - 02 Jul 2007

Good idea for usability. Adding myself as committed developer.

-- PeterThoeny - 2010-06-22

This is now AcceptedBy7DayFeedbackPeriod.

-- PeterThoeny - 2010-06-30

This is now implemented and documented in SVN trunk.

-- PeterThoeny - 2010-06-30

Now that this is implemented I realize that we have an inconsistency in syntax:

  • PARENTTOPIC for variable
  • topicparent for URL parameter to edit and save script
  • $parent in FormattedSearch

Possibly deprecate URL parameter topicparent (but leave implemented) and add parenttopic? Or add parenttopic as undocumented parameter for those who assume things (like me?)?

-- PeterThoeny - 2010-07-01

For now I added parenttopic as undocumented parameter. If there are opinions to change the documented parameter we can change/deprecate the current syntax.

-- PeterThoeny - 2010-07-01

sticking to "parenttopic" in URL parameter is good idea

-- SopanShewale - 2010-07-02

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2010-07-02 - SopanShewale
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.