Documentation · ViewHelper reference

XSD schema file | vhs master

Page / LanguageMenuViewHelper

ViewHelper for rendering TYPO3 menus in Fluid Require the extension staticinfotable. /

  • Tag usage example

    <v:page.languageMenu class="NULL" dir="NULL" id="NULL" lang="NULL" style="NULL" title="NULL" accesskey="NULL" tabindex="123" onclick="NULL" tagName="'ul'" tagNameChildren="'li'" defaultIsoFlag="'gb'" defaultLanguageLabel="'English'" order="[mixed]" labelOverwrite="[mixed]" hideNotTranslated="1" layout="'flag,name'" useCHash="1" flagPath="''" flagImageType="'svg'" linkCurrent="1" classCurrent="'current'" as="'languageMenu'" pageUid="123" configuration="{foo: 'bar'}" excludeQueryVars="''">
    	<!-- tag content - may be ignored! -->
    </v:page.languageMenu>
  • Inline usage example

    {v:page.languageMenu(class: 'NULL', dir: 'NULL', id: 'NULL', lang: 'NULL', style: 'NULL', title: 'NULL', accesskey: 'NULL', tabindex: 123, onclick: 'NULL', tagName: ''ul'', tagNameChildren: ''li'', defaultIsoFlag: ''gb'', defaultLanguageLabel: ''English'', order: [mixed], labelOverwrite: [mixed], hideNotTranslated: 1, layout: ''flag,name'', useCHash: 1, flagPath: '''', flagImageType: ''svg'', linkCurrent: 1, classCurrent: ''current'', as: ''languageMenu'', pageUid: 123, configuration: {foo: 'bar'}, excludeQueryVars: '''')}

Arguments

Argument Description Type
accesskey

Keyboard shortcut to access this element

string
as

If used, stores the menu pages as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used

string
class

CSS class(es) for this element

string
classCurrent

Sets the class, by which the current language will be marked

string
configuration

Additional typoLink configuration

array
defaultIsoFlag

ISO code of the default flag

string
defaultLanguageLabel

Label for the default language

string
dir

Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

string
excludeQueryVars

Comma-separate list of variables to exclude

string
flagImageType

Sets type of flag image: png, gif, jpeg

string
flagPath

Overwrites the path to the flag folder

string
hideNotTranslated

Hides languageIDs which are not translated

boolean
id

Unique (in this file) identifier for this HTML element.

string
labelOverwrite

Overrides language labels

mixed
lang

Language for this element. Use short names specified in RFC 1766

string
layout

How to render links when using autorendering. Possible selections: name,flag - use fx "name" or "flag,name" or "name,flag"

string
linkCurrent

Sets flag to link current language or not

boolean
onclick

JavaScript evaluated for the onclick event

string
order

Orders the languageIds after this list

mixed
pageUid

Optional page uid to use.

integer
style

Individual CSS styles for this element

string
tabindex

Specifies the tab order of this element

integer
tagName

Tag name to use for enclosing container, list and flags (not finished) only

string
tagNameChildren

Tag name to use for child nodes surrounding links, list and flags only

string
title

Tooltip text of element

string
useCHash

Use cHash for typolink

boolean
Required attribute

Revision history

commit ec2a5f73494e5dbbd09fe75a3bb2b8cb93f8c1a7
Author: Claus Due <[email protected]>
Date:   Sat Nov 3 13:48:24 2012 +0100

    [FEATURE] Page ViewHelpers
    
    Adds all page related ViewHelpers: content fetcher/renderer, footer
    data insert, header link/meta/title, absolute url, menu and breadcrumb
    ViewHelpers.

commit c6ce0c8a349d3b8a41dc06c6fff345f1398feb71
Author: Claus Due <[email protected]>
Date:   Sun Nov 18 15:07:55 2012 +0100

    [BUGFIX] Proper parent class, LanguageMenuViewHelper

commit 6e343b133ae057eb43d8dbb10975f1630aa7afee
Author: Claus Due <[email protected]>
Date:   Sun Dec 2 20:13:26 2012 +0100

    [TASK] Coding guideline cleanup

commit 55d3984f22ed7b4226d1a8eec7ae42889794e4a8
Author: Claus Due <[email protected]>
Date:   Thu Jan 31 21:23:24 2013 +0100

    [DOC] Doc comments in Menu ViewHelpers' initializeArguments methods

commit 14ca12f49385c719c77746f4d7d202e6807e2b8e
Author: Björn Fromme <[email protected]>
Date:   Wed Feb 20 21:28:55 2013 +0100

    [BUGFIX] Make argument layout act as documented

commit d43f992af431a8867b2460f184946f50c5831d5c
Author: Björn Fromme <[email protected]>
Date:   Wed Feb 20 21:54:09 2013 +0100

    [BUGFIX] Make argument linkCurrent act as documented

commit 82e811cd89a26faf82d1c2e8981568a9430eaf3b
Author: Björn Fromme <[email protected]>
Date:   Thu Feb 21 11:16:26 2013 +0100

    [TASK] CGL cleanup

commit 2899800125ad40f86561c30d20a3e4e7a097fb1a
Author: Björn Fromme <[email protected]>
Date:   Thu Feb 21 12:47:20 2013 +0100

    [TASK] Refactor to increase readability

commit 06f5ae90c5baa8c6cfc49dfd83b642ae22cae2bc
Author: Claus Due <[email protected]>
Date:   Thu Feb 21 14:00:14 2013 +0100

    [BUGFIX] Fix syntax error in LanguageMenu ViewHelper

commit 9b9fe904f891b25a63520bb4ac7437a10e769a49
Author: Claus Due <[email protected]>
Date:   Thu Feb 21 14:01:17 2013 +0100

    [BUGFIX] Return empty string from LanguageMenu ViewHelper if menu is empty
    
    This makes the LanguageMenu ViewHelper work just like the other Menu ViewHelpers when the menu is empty.
    
    Fixes: #66

commit 812925e3b1be49d9c8b7a75bab5fbc815c00601d
Author: Claus Due <[email protected]>
Date:   Wed May 22 00:06:43 2013 +0200

    [TASK] Cleanup as required by coding standards
    
    Excuse the not-using-PR-direct-to-master commit approach but this one is merely cosmetic in nature and the Travis build is failing because of it.

commit f765ef95a41f77a591f08830631d8a31049304e9
Author: Björn Fromme <[email protected]>
Date:   Sun May 26 16:04:13 2013 +0200

    [TASK] [email protected] annotations

commit c3c7b31021034f86ac4e0f61b312f77a38200957
Author: Claus Due <[email protected]>
Date:   Sat Jun 22 21:18:15 2013 +0200

    [FEATURE] Attribute "as" on all menu ViewHelpers
    
    Use of this argument allows setting the name of the variable that should contain the menu structure (note: in addition to the "menu" variable).

commit a00cbad8f3efd9d6cacef9f43c84d086f8a0f140
Author: Claus Due <[email protected]>
Date:   Sun Jun 23 21:37:24 2013 +0200

    [BUGFIX] Early return in LanguageMenu ViewHelper if BE or missing object

commit 2ae787867fae9bfef40ca8b1e949701a34219123
Merge: de450eb c3c7b31
Author: Björn Fromme <[email protected]>
Date:   Tue Jun 25 00:40:05 2013 -0700

    Merge pull request #223 from NamelessCoder/as
    
    [FEATURE] Attribute "as" on all menu ViewHelpers

commit 33329b50cfa2ad145130296f28f2a2a1d94dd5d5
Author: Björn Fromme <[email protected]>
Date:   Mon Jul 1 17:10:41 2013 +0200

    [TASK] Get flag image only when required
    
    This patch saves some database queries when using text only links in language menus.

commit c49bf9e1590c1a5229ca71579a43d946ef8752dc
Author: Björn Fromme <[email protected]>
Date:   Fri Jul 12 19:04:29 2013 +0200

    [TASK] Add first/last classes to language menu

commit 9956e7f68943faf1dd1f7084f1a61d8acf7a6219
Author: Florin Peter <[email protected]>
Date:   Fri Sep 13 10:24:50 2013 +0200

    [BUGFIX] Enable setting of tagName in LanguageMenuViewHelper

commit c1b0f1bd7aa5577de2d13e7b44bb9321d8c60b65
Author: Cedric Ziel <[email protected]>
Date:   Sun Dec 1 20:59:31 2013 +0100

    [TASK] Add the ability to modify the class of the current language
    
    A sensible default was provided to not break older versions.

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <[email protected]>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <[email protected]>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <[email protected]>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <[email protected]>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit cbb70932eed5e2fc390aa28cc4bd45cb757562a5
Author: Anton Danilov <[email protected]>
Date:   Mon Jun 23 16:22:51 2014 +0600

    [FEATURE] Add argument with page uid for building language menu.

commit 8ea2d458312d11d2a1f25c34a8056b88d2ce3d0a
Author: Claus Due <[email protected]>
Date:   Sat Sep 13 23:20:21 2014 +0200

    [BUGFIX] Generate language links equally for current/others
    
    Close: #672

commit 13d9bdf75176527916b7b44ad58f3a5cff42825a
Author: Cedric Ziel <[email protected]>
Date:   Thu Oct 2 14:36:33 2014 +0200

    [BUGFIX] Edge case http query string building
    
    Fixes #682

commit 393c7469c38ae80a49b7e05c9c0321eea2d55f19
Author: Danilo Bürger <[email protected]>
Date:   Fri Oct 3 10:07:40 2014 +0200

    [TASK] Allow additional typolink configuration on v:page.languageMenu

commit 83fdc55de5cd80abde3fd185f00b93c627584722
Author: Björn Fromme <[email protected]>
Date:   Fri Oct 3 16:13:47 2014 +0200

    [TASK] Relocate array merge method to utility class

commit b07b98eae6635151876b50f5fff72a04cac8d238
Author: Dmitry Dulepov <[email protected]>
Date:   Thu Dec 18 15:29:08 2014 +0300

    [FEATURE] Add an option to exclude certain GET variables in the language menu

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <[email protected]>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file