RH-Webdesign - Themes
Individual project request
EN
EN
  • Introduction
  • Preparation
    • Shopware Account
    • Install Theme
    • Theme Duplicates
  • Setup
    • Install Demo-Data
    • Footer Copyright
    • Basic settings
    • Status messages
    • Breakpoints for Devices
    • Typography / Fonts
    • Background Images
    • Advanced Color Settings
    • Certificates
    • Product boxes
    • Product Detail Page
    • Social Media
    • Individual Code
  • For Developers
    • Child-Theme
      • Extend configuration
      • Individual SCSS
      • Extend Templates
    • Integrate your own fonts
  • Shopware
    • Create categories
    • Multilanguage
    • Google Analytics - IMG
Powered by GitBook
On this page
  1. For Developers
  2. Child-Theme

Extend configuration

Individual setting options in the child theme

Last updated 1 year ago

In the previous post, I explained how to create a child theme. You can add another field to the theme.json file supplied:

You can find the possible configuration fields in the official Shopware developer documentation.

Tip: Just look in the main theme, where you can use existing fields as a guide.

Example of an additional color field

In the following example, I add a color field to the configuration, which you can then use from your administration. The color field is also compiled as CSS as an example in one of the following steps:

Your theme.json should include this code with an additional color field:

You can now use the SCSS variable $rhweb-custom-color-field in your code.

You can find more information on theme configuration in the .

Individual SCSS
official Shopware documentation
https://github.com/rhwebdesign/RHWebChildThemeTemplate/blob/master/src/Examples/_exampleColorField.json
{
  "configInheritance": [
    "@ParentThemeNamespace"
  ],
  "config": {
    "rhweb-custom-color-field": {
      "label": {
        "en-GB": "Individial Color Field",
        "de-DE": "Individuelles Farbfeld"
      },
      "helpText": {
        "en-GB": "",
        "de-DE": ""
      },
      "type": "color",
      "editable": true,
      "scss": true,
      "value": true,
      "tab": "tabName",
      "block": "blockName",
      "section": "sectionName",
      "order": 100
    }
  }
}