Documentation · ViewHelper reference

XSD schema file | vhs master

Asset / StyleViewHelper

Basic Style ViewHelper

Allows inserting a <link> or <style> Asset. Settings specify where to insert the Asset and how to treat it.

/

  • Tag usage example

    <v:asset.style content="NULL" path="NULL" external="1" name="NULL" overwrite="1" dependencies="NULL" group="'fluid'" debug="1" standalone="1" rewrite="1" fluid="1" variables="[mixed]" movable="1" trim="1" namedChunks="1">
    	<!-- tag content - may be ignored! -->
    </v:asset.style>
  • Inline usage example

    {v:asset.style(content: 'NULL', path: 'NULL', external: 1, name: 'NULL', overwrite: 1, dependencies: 'NULL', group: ''fluid'', debug: 1, standalone: 1, rewrite: 1, fluid: 1, variables: [mixed], movable: 1, trim: 1, namedChunks: 1)}

Arguments

Argument Description Type
content

Content to insert in header/footer

string
debug

If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper

boolean
dependencies

CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies

string
external

If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets

boolean
fluid

If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified

boolean
group

Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.

string
movable

If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.

boolean
name

Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"

string
namedChunks

If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency

boolean
overwrite

If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.

boolean
path

If not using tag content, specify path to file here

string
rewrite

If FALSE, this Asset will be included as is without any processing of contained urls

boolean
standalone

If TRUE, excludes this Asset from any concatenation which may be applied

boolean
trim

DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.

boolean
variables

An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same

mixed
Required attribute

Revision history

commit d8481bdae6c9c1c2a227e9c2e18ddd62a1ae0784
Author: Claus Due <*****@wildside.dk>
Date:   Sun Jan 20 02:10:49 2013 +0100

    [FEATURE] Basic Style Asset ViewHelper

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

    [TASK] Happy new year!

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

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