Tags:
create new tag
, view all tags

Question

Im looking for a way to obtain a topics parent via a % expansion rule. Something like %PARENT%. Ive tried %META{"parent"}% but that only works in the templates, not within the topic text itself.

I ended up hacking on TWiki.pm (line 1336 or so)

$_[0] =~ s/%TOPICPARENT%/&renderParent( $_[2], $_[1], (&TWiki::Store::readTopic($_[2],$_[1]))[0], 'dontrecurse="1"' )/goe; 

but there has got to be a better way then having to re-read the topic. Anyone???

  • TWiki version:
  • Web server:
  • Server OS:
  • Web browser:
  • Client OS:

-- JohnCavanaugh - 20 Jun 2002

Answer

There is currently no clean way to do that. See also Codev.FormattedTWikiFormDataInTopicText and Codev.SimplifyInternalMetaDataHandling

-- PeterThoeny - 23 Jul 2002

Topic revision: r3 - 2002-07-23 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.