Documentation · ViewHelper reference

XSD schema file | vhs master

Format / AppendViewHelper

Format: Append string content

Appends a string after another string. Although this task is very easily done in standard Fluid - i.e. {subject}{add} - this ViewHelper makes advanced chained inline processing possible:

<!-- useful when needing to chain string processing. Remove all "foo" and "bar"
     then add a text containing both "foo" and "bar", then format as HTML -->
{text -> v:format.eliminate(strings: 'foo,bar')
      -> v:format.append(add: ' - my foo and bar are the only ones in this text.')
      -> f:format.html()}
<!-- NOTE: you do not have to break the lines; done here only for presentation purposes -->

Makes no sense used as tag based ViewHelper:

<!-- DO NOT USE - depicts COUNTERPRODUCTIVE usage! -->
<v:format.append add="{f:translate(key: 're')}">{subject}</v:format.append>
<!-- ... which is the exact same as ... -->
<f:translate key="re" />{subject} <!-- OR --> {f:translate(key: 're')}{subject}

In other words: use this only when you do not have the option of simply using {subject}{add}, i.e. in complex inline statements used as attribute values on other ViewHelpers (where tag usage is undesirable). /

  • Tag usage example

    <v:format.append subject="NULL" add="NULL">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:format.append(subject: 'NULL', add: 'NULL')}


Argument Description Type

String to append


String to append other string to

Required attribute

Revision history

commit b551dca9d4d4c19eb739e9b90387decd77d20395
Author: Claus Due <*****>
Date:   Wed Jan 23 23:29:15 2013 +0100

    [FEATURE] Format / Prepend and Format / Append ViewHelpers

commit 213786bce95cb076f4a02abffe0b74a60538ac28
Author: Benjamin Rau <*****>
Date:   Thu Aug 22 13:50:55 2013 +0200

    [BUGFIX] Changed order of arguments in AppendViewHelper to support renderChildren

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to file