Symfony/Change configuration/en

From Aimeos documentation

< Symfony‎ | Change configuration

<languages/>

The core library contains a lot of configuration options documented in the Configuration section that can be changed in the aimeos_shop section of the config.yml file and they are displayed in the documentation like this:

client/html/catalog/filter/default/button = 1

Symfony uses the YAML configuration format by default which looks a little bit different. In YAML, each configuration part is indented by four additional spaces, so the "client" part below the "aimeos_shop" section is indented by four spaces while the "html" part is indented by eight spaces and so on.

As a rule of thumb, replace each slash (/) by a colon, a new line and four spaces (" ") for each additional indention:

  1. aimeos_shop:
  2.     client:
  3.         html:
  4.             catalog:
  5.                 filter:
  6.                     default:
  7.                         button: 1

The same works with arrays of values as well. In this case you can shorten YAML syntax by using the square brackets ([ and ]) in front of the list of values:

  1. aimeos_shop:
  2.     client:
  3.         html:
  4.             catalog:
  5.                 filter:
  6.                     default:
  7.                         subparts: [search, tree, attribute]

Values that contains not only values consisting of a-z, A-Z and 0-9 should be enclosed in double quotes ("):

  1. aimeos_shop:
  2.     test: "my test value"

Some values can contain a percent sign, which is a special operator in YAML files. Those percent signs must be quoted with another percent sign. A value like "%1$s%2$s" must be added to the config.yml file as

  1. aimeos_shop:
  2.     test: "%%1$s%%2$s"