Documentation · ViewHelper reference

XSD schema file | vhs 2.1.3

Render / AsciiViewHelper

Render: ASCII Character

Renders a single character identified by its charset number.

For example: <v:render.character ascii="10" /> renders a UNIX linebreak as does {v:render.character(ascii: 10)}. Can be used in combination with v:iterator.loop` to render sequences or repeat the same character:

{v:render.ascii(ascii: 10) -> v:iterator.loop(count: 5)}

And naturally you can feed any integer variable or ViewHelper return value into the ascii parameter throught renderChildren to allow chaining:

{variableWithAsciiInteger -> v:render.ascii()}

And arrays are also supported - they will produce a string of characters from each number in the array:

{v:render.ascii(ascii: {0: 13, 1: 10})}

Will produce a Windows line break, \r\n

  • Tag usage example

    <v:render.ascii ascii="[mixed]">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:render.ascii(ascii: [mixed])}


Argument Description Type
ascii mixed
Required attribute

Revision history

commit 9d4734744b507278f03d82e7e88eef32944359be
Author: Claus Due <*****>
Date:   Mon Jun 10 21:09:48 2013 +0200

    [FEATURE] Render / Ascii ViewHelper
    Renders ASCII characters from an integer or Traversable set of ASCII codes.

commit 32189f06ac7fdb7bc14a172493e71e5610da7d4f
Author: Claus Due <*****>
Date:   Wed Jun 12 18:42:38 2013 +0300

    [DOC] Incorrect curly brace in code example, Render / Ascii ViewHelper

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 12ff0ddfb8d36c51f2d3befde7ae812177c80d5d
Author: Xaver Maierhofer <*****>
Date:   Wed Jun 11 00:01:47 2014 +0200

    [TASK] CGL remove use leading backslash
    PHP Docs
    Note that for namespaced names (fully qualified namespace names containing namespace separator, such as Foo\Bar as opposed to global names that do not, such as FooBar),
    the leading backslash is unnecessary and not recommended, as import names must be fully qualified, and are not processed relative to the current namespace.

commit 4981055359c895f3869e5bd878293b3c15ed26e5
Author: Xaver Maierhofer <*****>
Date:   Sun Jan 18 14:01:04 2015 +0100

    [TASK] CGL - Define classes, params, use imports

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

    [TASK] Reference Copyright to file

commit 6580cbcae830cc37e8481171d96752e76aacfb83
Author: Claus Due <*****>
Date:   Tue Jan 20 14:55:26 2015 +0100

    [BUGFIX] Use is_numeric not ctype_digit to ensure ASCII code value