Documentation · ViewHelper reference

XSD schema file | vhs master

Page / StaticPrefixViewHelper

Page: Static Prefix

Use this ViewHelper to read the contents of the plugin.tx_vhs.settings.prependPath TypoScript location - this setting stores the static prefix which gets added to all relative resource URIs generated by VHS; whenever you require a ViewHelper which does not respect this setting you can use this ViewHelper to prepend that setting after the value is returned from the other ViewHelper. /

  • Tag usage example

    <v:page.staticPrefix>
    	<!-- tag content - may be ignored! -->
    </v:page.staticPrefix>
  • Inline usage example

    {v:page.staticPrefix()}

Arguments

Argument Description Type
Required attribute

Revision history

commit 5b9807ee70cd49d32c068a7af98eba103afdfab6
Author: Claus Due <*****@namelesscoder.net>
Date:   Sat Mar 8 23:04:33 2014 +0100

    [FEATURE] Cookie-less domain prefix setting
    
    This commit adds a `plugin.tx_vhs.settings.prependPath` setting which when used is inserted in front of all (relative) asset paths - including those returned by VHS's image ViewHelper and relative resource path ViewHelpers. In addition, the ViewHelper `v:page.prefixPath` ViewHelper is added which outputs this setting's value so it can be used with other ViewHelpers like `f:uri.image` or `f:uri.resource`.
    
    This setting has precedence over VHS's respect for `config.absRefPrefix` which means it is capable of containing a secondary domain name and protocol, allowing all URIs built for assets to _use a cookie-less domain name for all asset paths_. Doing this is generally considered a good idea since it allows requests to that domain to set and receive no cookies and thus be smaller and faster to process.

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

    [TASK] Switch to namespaces

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

    [TASK] Reference Copyright to license.md file