OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Custom bundle layout action: @setBlockTheme: relativ path not recognized

This topic contains 4 replies, has 2 voices, and was last updated by  Frank 2 weeks, 5 days ago.

  • Creator
    Topic
  • #40086

    Frank
    Participant

    Hi there,

    very small question:

    Changing a a twig-file in default layout for my custom bundle needs to be placed a new.html.twig-file, and a action path in corresponding new.yml set to new.html.twig:

    This results in the error-message:

    Unable to find template “/usr/share/nginx/html/oroapp/src/MyBundle/Resources/views/layouts/default/page/
    new_list_widget.html.twig”
    (looked into: /usr/share/nginx/html/oroapp/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /usr/share/nginx/html/oroapp/templates,
    /usr/share/nginx/html/oroapp/vendor/symfony/symfony/src/Symfony/Bridge/Twig/
    Resources/views/Form).

    FilesystemLoader->findTemplate( relative-path-to-twig-file ) does not recognize relative path.
    It is working, using relative path
    ‘OroBundle:layouts:default/page/old_list_widget.html.twig’ for testing,
    or using absolute path instead:

    It should work using relative path with MyBundle! What did I forget?

    Thanks
    Frank

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #40088
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    What version of OroCommerce do you use?

    #40090

    Frank
    Participant

    As always 3.1.9. … :-)

    Thanks
    Frank

    #40106
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    There is a more straightforward option available when you place the template file near the layout update file; you can reference it relatively from the layout update file:

    #40125

    Frank
    Participant

    Hi Andrey,

    yes, that works fine!

    Thank you a lot.

    Regards
    Frank

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No