Layout adapting
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 19
- Joined: 14 Aug 2019, 08:13
Layout adapting
Hi.
I'm very new to aimeos (2019.07.*), and I like to setup an aimeos shop under symfony 4.3/4.4. All worked good so fare but
the last adapting I can't solf. The problem is:
I've got this structure:
template/bundels/base.html.twig which could be found so I can adapt this basic layout. But in there is a twig block
{% block aimeos_scripts %}{% endblock %}
I which aimeos load this one: vendor/aimeos/aimeos-symfony/Resources/views/base.html.twig
So how can I override this template?
Thank you
I'm very new to aimeos (2019.07.*), and I like to setup an aimeos shop under symfony 4.3/4.4. All worked good so fare but
the last adapting I can't solf. The problem is:
I've got this structure:
template/bundels/base.html.twig which could be found so I can adapt this basic layout. But in there is a twig block
{% block aimeos_scripts %}{% endblock %}
I which aimeos load this one: vendor/aimeos/aimeos-symfony/Resources/views/base.html.twig
So how can I override this template?
Thank you
Re: Layout adapting
Place your file into ./templates/bundles/AimeosShop/base.html.twig to overwrite the original template:
https://symfony.com/doc/current/bundles ... #templates
https://symfony.com/doc/current/bundles ... #templates
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 19
- Joined: 14 Aug 2019, 08:13
Re: Layout adapting
Thank you for your fast response.
I did this but aimeos seems to load vendor/aimeos/aimeos-symfony/Resources/views/base.html.twig.
The point is, I have to change our layout complete due to change all the cdn's which I can't have access...
Is there another config i.e. yaml or something. I have also cleared the cache with ./bin/console cache:clear
Thankyou
Michael
I did this but aimeos seems to load vendor/aimeos/aimeos-symfony/Resources/views/base.html.twig.
The point is, I have to change our layout complete due to change all the cdn's which I can't have access...
Is there another config i.e. yaml or something. I have also cleared the cache with ./bin/console cache:clear
Thankyou
Michael
Re: Layout adapting
Can you try ./templates/bundles/AimeosShopBundle/base.html.twig instead?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 19
- Joined: 14 Aug 2019, 08:13
Re: Layout adapting
Hello aimos.
Unfortunately no. I still got the base.html.twig loaded from vendor folder... :-/
I have a themes folder placed in ./public/bundels/aimeosshop/
And in ./public/bundels/aimeosshop/themes/elegance/ i have a aimeos.css file which will be overwritten, wenn I start composer update!! maybe something went wrong, when I installed your aimeos bundle in symfony4.3!?
Michael
Unfortunately no. I still got the base.html.twig loaded from vendor folder... :-/
I have a themes folder placed in ./public/bundels/aimeosshop/
And in ./public/bundels/aimeosshop/themes/elegance/ i have a aimeos.css file which will be overwritten, wenn I start composer update!! maybe something went wrong, when I installed your aimeos bundle in symfony4.3!?
Michael
Re: Layout adapting
According to the Symfony docs placing a modified file in ./templates/bundles/AimeosShopBundle/base.html.twig should work. But we don't get it working either with Symfony 4.3 :-/
The files in ./public/bundles/aimeosshop/ are automatically overwritten by Symfony on update. You can change them but have to copy and modify them ... what brings us back to the problem of overwriting the base.html.twig ...
The files in ./public/bundles/aimeosshop/ are automatically overwritten by Symfony on update. You can change them but have to copy and modify them ... what brings us back to the problem of overwriting the base.html.twig ...
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Layout adapting
Good news, we've found the problem. In Symfony 4 the template resolution syntax has changed but he old one still works ... without resolving overwritten templates.
Old:
New:
Run "composer update" to get aimeos/aimeos-symfony 2019.07.3 and your overwritten base.html.twig from the Aimeos bundle will be used
Old:
Code: Select all
AimeosShopBundle:Catalog:list.html.twig
Code: Select all
@AimeosShop/Catalog/list.html.twig
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star