create new tag
, view all tags

SID-02343: New line in varCHILDREN

Status: Answered Answered TWiki version: 6.0.2 Perl version:
Category: CategoryEditing Server OS: Last update: 4 months ago

How can I render %CHILDREN% at a new line? VarCHILDREN says: "Supports same format strings as SEARCH. See FormattedSearch for usage, variables & examples", but $n doesn't seem to work (%CHILDREN{format="$topic$n()"}%), nor separator="$n" seems to work.

-- Emiel Van Riel - 2018-02-05

Discussion and Answer

Oh, I guess it does work, and you just don't see it after HTML rendering. The format parameter works as a replacement in the TWiki markup, like you see it in "Raw edit" mode. A single line break doesn't end a paragraph in wiki markup!

To see a line break in your page, you have several options. Note that all cases I add the newline to the format parameter, to make sure that it is also added after the last child:

  • Use either two consecutive line breaks to separate like paragraphs, or the %BR% markup for a new line without paragraph spacing:
    • format="$topic$n$n" separator="" or format="$topic%BR%" separator=""
  • Or use a format where a single line break in the wiki source matters.
    • A list: format="   * $topic$n" separator=""
    • A table: format="| $topic |$n" separator=""

-- Harald Jörg - 2018-02-05

Thanks Harald. format="$topic$n$n" separator="" doesn't work in my environment, but format="$topic%BR%" separator="" works fine.

-- Emiel Van Riel - 2018-02-05

      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 New line in varCHILDREN
SupportCategory CategoryEditing
TWiki version 6.0.2
Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2018-02-05 - EmielVanRiel
  • 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.