Appearance
Settings
Settings uses to references from Configuration to be able to render different things. You can use the settings to change background images, fonts, colours and add custom text etc...
To add settings, simply add a settings object either by coping from the configuration page or manually typing or copying something you've already done to the settings array in your section.
Here's an example of a background image and font colour in a sections settings
json
{
"id": "clients",
"name": "Clients",
"default_view": "components.sections.clients",
"pages": "any",
"components": {},
"settings": [
{
"type": "media",
"id": "background",
"label": "Background Image"
},
{
"type": "colour",
"id": "text_colour",
"label": "Text Colour",
"default": "#000000"
}
],
"translations": {
"en": {}
},
"layout": {}
}When it comes to accessing settings, it's pretty straight forward, if you are accessing the media you use Section::mediaObj('background') and if you're accessing anything else you use Section::default('text_colour')
default
Will return a value or string version of the setting
mediaObj
mediaObj will return null or an instance of the media which can be used in conjunction with the media() function