Toggle English and Welsh
Nunjucks macro options
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
Some options are required for the macro to work; these are marked as "Required" in the option description.
If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.
Name | Type | Description |
---|---|---|
selectedLang | string | Used to switch between langauges - defaults to English. |
href | object | Required. Object for setting urls, see href |
Options for href object
Name | Type | Description |
---|---|---|
en | string | Required. URL to switch to English Langauge |
cy | string | Required. URL to switch to Welsh Langauge |