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

Add default templates for the most common views

    Details

    • Type: Story Story
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2015.11
    • Component/s: Platform stack
    • Labels:

      Description

      Templates that cover the most common views must be added:

      • content (full, embed, line)
      • block

      It should be possible to customize those templates.
      It should be possible to use a custom controller with custom default view templates.

        Issue Links

          Activity

          Show
          Bertrand Dunogier added a comment - https://github.com/ezsystems/ezpublish-kernel/pull/1496
          Hide
          Bertrand Dunogier added a comment -
          Show
          Bertrand Dunogier added a comment - ezsystems/ezpublish-kernel#1496 merged to master@3bccca9 .
          Hide
          Support Netmaking added a comment -

          I realize I'm a little late to the party here, but I wanted to point out that I (and the rest of our company) do not agree with this implementation.

          As a long time implementation partner, the default templates have caused us more grief then good. Usually, when someone hits a page that does not have a custom template, it is because it has been forgotten. And in those cases, an error would be much more preferable compared to a useless, default template that, in a worst case scenario, might pose a security risk (expose data from fields that are intended to be private).

          Having a default template might make sense for users who do minimal customization, and rely greatly on the demo design. If that's the use case here, I suggest moving the default template to the proper demo bundle. Regardless, I would argue that the current state of the default template is not useful to anyone, and rather runs the risk of doing harm.

          Show
          Support Netmaking added a comment - I realize I'm a little late to the party here, but I wanted to point out that I (and the rest of our company) do not agree with this implementation. As a long time implementation partner, the default templates have caused us more grief then good. Usually, when someone hits a page that does not have a custom template, it is because it has been forgotten. And in those cases, an error would be much more preferable compared to a useless, default template that, in a worst case scenario, might pose a security risk (expose data from fields that are intended to be private). Having a default template might make sense for users who do minimal customization, and rely greatly on the demo design. If that's the use case here, I suggest moving the default template to the proper demo bundle. Regardless, I would argue that the current state of the default template is not useful to anyone, and rather runs the risk of doing harm.
          Hide
          André Rømcke added a comment - - edited

          Thanks Support Netmaking, makes sense, at a minimum we should not iterate the fields for the said security if developer does template setup mistake and content admin does permission mistake issue. And your right that it has limited value besides making sure we have something coming up out of the box. However IMO embed+line template by default could have some value potentially. But could you create a new issue to describe how you and your team think it should behave? Then we can move the discussion there.

          Show
          André Rømcke added a comment - - edited Thanks Support Netmaking , makes sense, at a minimum we should not iterate the fields for the said security if developer does template setup mistake and content admin does permission mistake issue. And your right that it has limited value besides making sure we have something coming up out of the box. However IMO embed+line template by default could have some value potentially. But could you create a new issue to describe how you and your team think it should behave? Then we can move the discussion there.
          Hide
          Bertrand Dunogier added a comment - - edited

          Thank you for your feedback.

          I understand your concerns, and they make sense. On the other hand, the idea here was to avoid that the first thing any user starting a project gets is an error page, without forcing a predefined configuration that you have to delete. It doesn't add any value to the demo site that I know about.

          I see why you'd prefer an error, but I'm not sure it is what everybody wants: several others were involved in the pull request, including implementation partners, and what was merged is what we ended up with together.

          But we did pay particular attention to make this easily customizable:

          • the default templates can be customized by means of container parameters
          • the default rules can be customized, including a custom controller, by means of semantic config. You could for instance have an error controller + template that matches your needs.

          Both approaches can be seen in default_settings.yml.

          Feel free to open the discussion on a different approach.

          Show
          Bertrand Dunogier added a comment - - edited Thank you for your feedback. I understand your concerns, and they make sense. On the other hand, the idea here was to avoid that the first thing any user starting a project gets is an error page, without forcing a predefined configuration that you have to delete. It doesn't add any value to the demo site that I know about. I see why you'd prefer an error, but I'm not sure it is what everybody wants: several others were involved in the pull request, including implementation partners, and what was merged is what we ended up with together. But we did pay particular attention to make this easily customizable: the default templates can be customized by means of container parameters the default rules can be customized, including a custom controller, by means of semantic config. You could for instance have an error controller + template that matches your needs. Both approaches can be seen in default_settings.yml . Feel free to open the discussion on a different approach.
          Hide
          Eirik Alfstad Johansen added a comment -

          Since the default templates are configurable and we have a base bundle that always will be implemented, we are fine with this solution.

          Show
          Eirik Alfstad Johansen added a comment - Since the default templates are configurable and we have a base bundle that always will be implemented, we are fine with this solution.
          Show
          Bertrand Dunogier added a comment - Documented at https://doc.ez.no/display/TECHDOC/Default+view+templates .
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: