Documentation · ViewHelper reference

XSD schema file | vhs 2.1.4

System / UniqIdViewHelper

System: Unique ID

Returns a unique ID based on PHP's uniqid-function.

Comes in useful when handling/generating html-element-IDs for usage with JavaScript.

  • Tag usage example

    <v:system.uniqId prefix="''" moreEntropy="1">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:system.uniqId(prefix: '''', moreEntropy: 1)}


Argument Description Type

Add some pseudo random strings. Refer to uniqid()'s Reference.


An optional prefix for making sure it's unique across environments

Required attribute

Revision history

commit e821b86c3c4d98c3f6aa88fe4a906d7fe794e030
Author: Cedric Ziel <*****>
Date:   Thu Jul 25 11:22:49 2013 +0200

    [FEATURE] Create UniqId ViewHelper
    No typo in there. It calls the PHP uniqid() - core function with the according parameters.

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 8257bd7095e568e99d10622babd726eeb549699f
Author: Claus Due <*****>
Date:   Sat Oct 4 16:24:52 2014 +0200

    [TASK] Increase coverage

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

    [TASK] Reference Copyright to file