Tags:
create new tag
, view all tags

Question

I want to have in my topic A link to topic B + heading 1 from B. Must i use INCLUDE+regexp or INCLUDE+section or is there something easier like [[B B.%H1%]] ?

Example, topic B contains
---+ This is B
...

Topic A should contain:
...
[[B]]This is B (where the text 'This is B' comes from topic B). One possibility is as I wrote:
[[B]]%INCLUDE{"B" pattern="..."}%but something shorter would be probably very useful, eg.
[[B B.%H1%]]

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- MartinDluhos - 02 Jan 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

You cannot specify anything with an object-like syntax.

You either have to get the first headline text using a formatted search or using INCLUDE.

If the B topic has a form, you can make a title field in the form.

In B you write

---++ %FORMFIELD{"title"}%

In A you write

[[B]] %FORMFIELD{"title" topic="B"}%

And then you can change the title by editing the field in the form of B.

With INCLUDE you do can solve the same task like this

TopicB:

---+ %STARTSECTION{"headline"}%This the Test Headline%ENDSECTION{"headline"}%

and in TopicA

[[TopicB]] %INCLUDE{section="headline" "TopicB"}%

Note that if the topic name is a WikiWord then you do not need the [[]] notation.

If you want the headline to be a link then make topic linking like

[[TopicB][%INCLUDE{section="headline" "TopicB"}%]]

-- KennethLavrsen - 02 Jan 2007

An object oriented ContentAccessSyntax is currently at the discussion stage; a logical step to make TWiki stronger as an TWikiApplications platform.

-- PeterThoeny - 02 Jan 2007

 
Change status to:
Topic revision: r4 - 2007-01-02 - 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.