This page last changed on Oct 18, 2011 by jed.wheeler@involver.com.

Overview

This filter appends a specified string to the variable being filtered.


Attributes

type required description
string true The string to append to the filtered variable.

Examples

Append some characters to a string

Given the string "foo", to come up with "foobar", you would use the following code:

{{ 'foo' | append: 'bar' }}

The above code would yield:

foobar

Complete a sentence

Given the string, "Mary had a little", if you wanted to indicate that Mary had a little lamb, you would use:

{{ 'Mary had a little' | append: ' lamb.' }}

The above code would yield:

Mary had a little lamb.

FAQ

  1. Can I use this to add characters to the beginning of another string?
    No, you would use the prepend filter for that purpose (see below).

Related Topics

Document generated by Confluence on Feb 12, 2013 09:09