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

Override by table_classification on td/th/tr tags has been broken since 3.9

    XMLWordPrintable

Details

    Description

      This was encountered on doc.ez.no, and since the feature was quite usefull it should probably be re implemented.

      Patch:

      diff --git a/kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php b/kernel/classes/datatypes/ezxmltext/handlers/output/ez
      index 5423485..5cbce88 100644
      --- a/kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php
      +++ b/kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php
      @@ -403,6 +403,12 @@ class eZXHTMLXMLOutput extends eZXMLOutputHandler
       
               $ret = array( 'tpl_vars' => array( 'row_count' => $parentParams['table_row_count'],
                                                  'col_count' => $colCount ) );
      +
      +        // Allow overrides based on table class
      +        $parent = $element->parentNode;
      +        if ( $parent instanceof DOMElement && $parent->hasAttribute('class') )
      +            $ret['design_keys'] = array( 'table_classification' => $parent->getAttribute('class') );
      +
               return $ret;
           }
       
      @@ -415,6 +421,12 @@ class eZXHTMLXMLOutput extends eZXMLOutputHandler
       
               $ret = array( 'tpl_vars' => array( 'col_count' => &$siblingParams['table_col_count'],
                                                  'row_count' => &$parentParams['table_row_count'] ) );
      +
      +        // Allow overrides based on table class
      +        $parent = $element->parentNode->parentNode;
      +        if ( $parent instanceof DOMElement && $parent->hasAttribute('class') )
      +            $ret['design_keys'] = array( 'table_classification' => $parent->getAttribute('class') );
      +
               return $ret;
           }
      

      Attachments

        Activity

          People

            andre1 andre1
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: