문제

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.

도움이 되었습니까?

해결책

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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top