SID-02343: New line in varCHILDREN
| Status: |
Answered |
TWiki version: |
6.0.2 |
Perl version: |
|
| Category: |
CategoryEditing |
Server OS: |
|
Last update: |
7 years 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
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.