Tags:
create new tag
view all tags

Question

Quick Question (Details follow): My question: is there some way to modify text from the TOPIC variable inside of a formatted search?

I am creating a master document that is nested with several subtopics. My topics look like:

HowToDoItManual

=%SEARCH{ "^%TOPIC%\d\z"...format="---++ $web.$topic...%=

HowToDoItManualPhase1

=%SEARCH{ "^%TOPIC%\d\z"...format="---+++ $web.$topic...%=

HowToDoItManualPhase1Objectives

The goal of the first phase is...

This was the best way I could come up with to make the document "roll up" into the master but still allow a transparent, loose structure.

HowToDoItManual becomes

HowToDoItManual

HowToDoItManualPhase1

HowToDoItManualPhase1Objectives

The goal of the first phase is...

HowToDoItManualPhase1TaskList

  • Create plan...

My question is, is there some way to modify text from the

%TOPIC%
variable inside of a formatted search?

I'd like to cut out the text of the current TOPIC so that the master document page looks like

HowToDoItManual

Phase1

Objectives

The goal of the first phase is...

TaskList

  • Create plan...

I think I need something like

%REPLACE{ %TOPIC%, "HowToDoItManual","" }%

I searched in vain for several hours to find a way to modify variable text, I haven't found any except for the SPACEOUTvariable.

If there is a much smarter way to collate documents for master documents that the one I'm using, that is an option as well.

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian
Web server: Apache
Perl version:  
Client OS: Windows XP
Web Browser: Firefox
Categories:  

-- DanielHelsten - 07 Jun 2006

Answer

TWiki supports transclusion using variables VarSTARTSECTION and VarINCLUDE.

Other than that TocPlugin can be very useful when doing master documents.

-- SteffenPoulsen - 16 Jun 2006

Thanks. I'm exploring the TocPlugin and trying to get a handle on its full functionality. I think it will do the job. Can anyone point me to an example of transclusion using the above variables? Not being a programmer, I lack an understanding about which parameters to pass to the variable and how to structure the topic.

-- DanielHelsten - 20 Jun 2006

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-06-20 - DanielHelsten
 
  • 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.