Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-28868

Integrate the design engine

    XMLWordPrintable

Details

    • [2.2] Sprint 6
    • 2

    Description

      With this story, the design engine should be fully integrated to eZ Platform, for the frontend and backend.

      ezsystems/ezplatform-standard-design package

      This package sets the default configuration for ezplatform-design-engine.

      It defines a standard theme, and make existing templates (kernel & repository forms) part of this theme. How the second part can be achieved is described in EZP-28870.

      app design

      The frontend app uses the standard theme, as well as an app one, in an app design. This is configured in the meta-repositories:

      ezdesign:
        design_list:
          app: [app, standard]
      
      ezpublish:
        system:
          frontend:
            design: app
      

      The app theme is mapped by default to app/Resources/views.

      admin theme & design

      The admin-ui needs to use the "admin" design, that uses the standard + admin themes:

      ezpublish:
        system:
          admin:
            design: admin
      
      ezdesign:
        design_list:
          admin: ["admin", "standard"]
      

      Existing templates in the admin-ui must be loaded through the design engine. There is an open pull-request by Edi Modric that does this, but it moves templates around, in a themes/admin directory. We suggest that the app/Resources/views directory is instead mapped to the admin theme, using the ezdesign configuration.

      Acceptance

      
      Background:
       Given that my frontend uses the "app" design
         And the "app" design contains the "app" and "standard" themes
      
      Scenario: the design engine can load app templates
      When I create a template in {{app/Resources/views}}
       And I refer to this template using the @ezdesign notation
       And I render a page that uses that template reference
       # This can be found in the Twig tab of the Sf profiler
       Then it has been rendered using the template from the "app" design
      
      Scenario: built-in templates can be overridden using the design engine
      
      Given an eZ Platform feature that gets rendered using a given template
        And that template is loaded from the standard design
       When I create a template with the same path in "app/Resources/views/themes/standard"
        And I render the feature again
       Then it uses my custom template
      
      Given an eZ Platform admin feature that gets rendered using a given template
        And that template is loaded from the admin design
       When I create a template with the same path in "app/Resources/views/themes/admin"
        And I render the feature again
       Then it uses my custom template 
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: