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

(tc-525)(eZ Flow) - Override background color of a table, by template table definition

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.6.0-dev
    • Labels:
      None
    • Environment:

      Operating System: RHEL 6.1
      PHP Version: (please be specific, like '4.4.3' or '5.1.5'): 5.3.3
      Database and version: Mysql 5.1.52
      Browser (and version):

      Description

      Hi,

      Overriding a table template, to change the background color, doesn't work.

      Steps to reproduce

      Edit the settings/override/override.ini.append.php and add the following:
       
       <?php /* #?ini charset="utf-8"?
       [table_comparison_tr]
       Source=content/datatype/view/ezxmltags/tr.tpl
       MatchFile=datatype/ezxmltext/tr_comparison.tpl
       Subdir=templates
       Match[table_classification]=comparison
       */ ?>
      

      Setup, create a folder and an article with a table within the folder
          Login into admin as admin
          Click on “Content Structure” on top menu
          Create a “News” folder
          Create a new article “Article1” with the following data:
          Title: Article1
          Summary: Below there is a table with a 4x4 rows/columns
          Click on the “Inserts a new table” button
          Columns: 4
          Rows: 4
          Class: Comparison Table
          Summary (WAY): Test
          Click on the “OK” button
          Fill in each one of the table cells with “o”
          Click on “Send for Publishing” button
       
       
       
      Verify the background of the table in ezflow
          Access ezflow
          Click on “News” folder
          Click on “Article1” article
          Verify that the table has a grey background
       
       
      Define a new template to change the table background color
          Create a new tr_comparison.tpl template:
          $ vi /extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/tr_comparison.tpl
          <tr{if ne($classification,'')} class="{$classification|wash}"{/if} style="background-color: red;">
          {$content}
          </tr>
          Clear cache
          $ rm -rf var/cache
          $ rm -rf  var/ezflow_site/cache
       
       
      Verify the table background color
          Access ezflow
          Click on “News” folder
          Click on “Article1” article
          Verify that the table has now a red background
       
      
      

      In the last step of the test, instead of becoming red, the background remains grey.

        Activity

        Hide
        André R added a comment -

        Works here using:

        [table_comparison_tr]
        Source=content/datatype/view/ezxmltags/tr.tpl
        MatchFile=datatype/ezxmltext/tr_comparison.tpl
        Subdir=templates
        Match[table_classification]=comparison

        [table_comparison_td]
        Source=content/datatype/view/ezxmltags/td.tpl
        MatchFile=datatype/ezxmltext/td_comparison.tpl
        Subdir=templates
        Match[table_classification]=comparison

        with files in:
        /extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/tr_comparison.tpl
        /extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/td_comparison.tpl

        I was testing on ezwebin but ezflow is built on ezwebin so should not matter much.

        Look for errors about "could not find template(...)", then you at least know the override rule is used.

        Show
        André R added a comment - Works here using: [table_comparison_tr] Source=content/datatype/view/ezxmltags/tr.tpl MatchFile=datatype/ezxmltext/tr_comparison.tpl Subdir=templates Match [table_classification] =comparison [table_comparison_td] Source=content/datatype/view/ezxmltags/td.tpl MatchFile=datatype/ezxmltext/td_comparison.tpl Subdir=templates Match [table_classification] =comparison with files in: /extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/tr_comparison.tpl /extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/td_comparison.tpl I was testing on ezwebin but ezflow is built on ezwebin so should not matter much. Look for errors about "could not find template(...)", then you at least know the override rule is used.
        Hide
        Geir Arne Waaler added a comment -

        This one is reviewed as Works here, so I move it to Closed.

        Show
        Geir Arne Waaler added a comment - This one is reviewed as Works here, so I move it to Closed.

          People

          • Assignee:
            André R
            Reporter:
            Paulo Cardiga
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: