0
votes

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.

1
Yes, which fails for the same reason that my translations defined in my bundle's Resources/translations/messages.en.yml fails. I was able to override another translation, but was confused as to why my translation overrides for some other messages (e.g. sylius.meta.frontend_title) weren't working. I came up with a workaround, but stackoverflow won't let me post an answer until 8 hrs after the time I posted my question. Thanks for the comment though, Ramy!sabliao

1 Answers

1
votes

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.