ssossossosso

Forums

Covering OroCommerce topics, B2B eCommerce trends, community updates and company announcements.

This topic contains 5 replies, has 2 voices, and was last updated by  mike.mckean 5 months, 2 weeks ago.

  • Creator
    Topic
  • #4255

    mike.mckean
    Participant

    Hello! I’ve been following the Quick Start guide for Layout Themes, and have run into a couple problems after making the controller. Below is my controller (example copied from the guide):

    First, I was blocked by the fact that routing would not work in the Controller (annotation type). The ‘/test’ route was not recognized by Symfony. After research I tried including this in app/config/routing.yml:

    … and that worked! So, I think it should be noted in the docs that this change is required for routing to work.

    However, I then went to /test and the page only contained a header and footer, with empty content. I tried to place some HTML in various places in the default.html.twig file, but none of it showed up. Does anyone know what I might be missing? I followed the Quick Start exactly as far as I know.


    UI Developer at E7 Solutions
    http://www.e7solutions.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #4262

    mike.mckean
    Participant

    Is it possible my reference to the layout is not written correctly? It is in the same directory as the default. (everything else is directly copied from the Quick Start)


    UI Developer at E7 Solutions
    http://www.e7solutions.com

    #4360
    dnahrebecki
    dnahrebecki
    Oro Core

    Hello mike,
    please check following points:
    – if your definition of “store” theme meets requirements link
    – if you set your theme as a default link
    – if you are working in dev mode you can check all layout structure in debug toolbar
    – if you are working in dev mode you can enable “System -> Configuration -> General setup -> Development settings -> Include Block Debug Info Into HTML” and check in your browser which layout blocks are rendered

    Also, you can have a look at theme and layout documentation

    Best Regards,
    Daniel Nahrebecki

    #4363

    mike.mckean
    Participant

    Sorry Daniel, I had to continue this through email. Here are some points that helped me solve the issue, that I didn’t get from the docs:

    1. Be sure to set the theme in the Admin panel, not just in config.yml. Otherwise the ‘default’ theme (which is actually the id of Oro’s layout theme) overrides it.
    2. The Quick Start docs work for Platform, but not for OroCommerce. When you set ‘groups’ in theme.yml, you need to include the ‘commerce’ group:


    UI Developer at E7 Solutions
    http://www.e7solutions.com

    #4369
    dnahrebecki
    dnahrebecki
    Oro Core

    Thanks for pointing this out. I’ve created a ticket to make documentation more clear for this case.

    #4373

    mike.mckean
    Participant

    Thanks!


    UI Developer at E7 Solutions
    http://www.e7solutions.com

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

You must be logged in to reply to this topic.