Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.4.0
-
None
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; }