Modified: trunk/kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php
===================================================================
--- trunk/kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php 2006-03-24 11:26:45 UTC (rev 15292)
+++ trunk/kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php 2006-03-24 11:29:44 UTC (rev 15293)
@@ -341,8 +341,20 @@
$sectionLevel = $currentSectionLevel;
$class = $paragraph->attributeValue( 'class' );
+ $curChildIndex = 0;
+ $totalChildren = count( $paragraph->children() );
foreach ( $paragraph->children() as $paragraphNode )
{
+ $curChildIndex++;
+
+ if ( $curChildIndex == $totalChildren )
+ {
+ $this->LastParagraphChild = true;
+ }
+ else
+ {
+ $this->LastParagraphChild = false;
+ }
$isBlockTag = false;
$content =& $this->renderXHTMLTag( $tpl, $paragraphNode, $sectionLevel, $isBlockTag, $tdSectionLevel );
if ( $isBlockTag === true )
@@ -1020,6 +1032,12 @@
$tpl->setVariable( 'content', $childTagText, 'xmltagns' );
$uri = "design:content/datatype/view/ezxmltags/$tagName.tpl";
+ //force rendering last line without <br> i.e. as plain text
+ if ( $tagName == 'line' && $this->LastParagraphChild )
+ {
+ $uri = "design:content/datatype/view/ezxmltags/text.tpl";
+ }
+
$textElements = array();
include_once( 'lib/eztemplate/classes/eztemplateincludefunction.php' );
eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );
@@ -1110,6 +1128,10 @@
/// Contains the Nodes hashed by ID
var $NodeArray = array();
+
+ /// Contains boolean flag if current child is last among paragraph children
+ /// used when rendering last <line> tag.
+ var $LastParagraphChild = false;
/// Array of parameters for rendering tags that are children of 'link' tag
var $LinkParameters = array();