Question

I'm trying to override messages such as 'sylius.meta.frontend_title', but then I realized that the translations for these messages aren't used since the default settings for the 'general' namespace are hardcoded/set in GeneralSettingsSchema.php (in CoreBundle) [see below for twig snippet from WebBundle's layout.html.twig]:

    {{ settings.title|default('sylius.meta.frontend_title'|trans) }}

where settings is obtained with a call to the twig function sylius_settings_all('general'), with 'general' as the namespace for the schema desired. How can I override what title is displayed on my store's frontend (along w/ the other translations that are set by default e.g. 'sylius.meta.frontend_description')?

Btw, I'm using the full sylius bundle, which includes all the bundles in one installment.

Was it helpful?

Solution

You have 3 ways to do this:

  1. Override twig template where title is rendered.
  2. Override GeneralSettingsSchema class (to change defaults).
  3. Go to http://demo.sylius.org/administration/settings/general and change values.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top