XF 1.4 "xen:raw $child" causing line jump

king8084

Well-known member
i'm running into problems trying to display child forum titles on my main page. i know where to edit it (node_forum_level_2), and what to add:
Code:
                <xen:if is="{$renderedChildren} AND {$level} == 2">
                            <ol class="secondaryContent">
                            <xen:foreach loop="$renderedChildren" value="$child">
                                {xen:raw $child}
                            </xen:foreach>
                            </ol>
                </xen:if>

but the issue is that when outputting the xen:raw $child piece, it will automatically add a return stroke / new line /new row to the output. more specifically, i'm trying to do:
<parent title> <child title>

but the xen:raw is forcing it to look like:
<parent title>
<child title>

simply using $child outputs the html code, and it looks like "xen:raw" is what's responsible..


let me elaborate a bit more.. in node_forum_level_2, the following is where the parent title/link is output:
Code:
<a href="{xen:link forums, $forum}" data-description="{xen:if @nodeListDescriptionTooltips, '#nodeDescription-{$forum.node_id}'}">{$forum.title}</a></h3>
which, in my forum, outputs:
upload_2014-12-10_10-20-39-png.91430


in an attempt to narrow down my problem, i tried the most basic test and changed that part of the code to:
Code:
<a href="{xen:link forums, $forum}" data-description="{xen:if @nodeListDescriptionTooltips, '#nodeDescription-{$forum.node_id}'}">{$forum.title}</a>test</h3>
which returns:
upload_2014-12-10_10-21-17-png.91431


...the word "test" gets appended to the forum title (which is what i want and would expect). however, when trying to output $child here, i get:
Code:
<a href="{xen:link forums, $forum}" data-description="{xen:if @nodeListDescriptionTooltips, '#nodeDescription-{$forum.node_id}'}">{$forum.title}</a><xen:foreach loop="$renderedChildren" value="$child">{xen:raw $child}</xen:foreach></h3>
upload_2014-12-10_10-23-36-png.91432


it was suggested that i use float and apply it to the output via a div or span. upon trying that, i got:
Code:
<a href="{xen:link forums, $forum}" data-description="{xen:if @nodeListDescriptionTooltips, '#nodeDescription-{$forum.node_id}'}">{$forum.title}</a><xen:foreach loop="$renderedChildren" value="$child"><span class="xt-custom-children-child">{xen:raw $child}</span></xen:foreach></h3>

with:
.xt-custom-children-child {
    float: top;
}
upload_2014-12-10_10-27-4-png.91435


likewise, when changing the float to "right", i get:
upload_2014-12-10_10-26-30-png.91434

...but note that this isn't stemming from the title "Music" in any way -- i tested changing "Music" to the max 50 characters, and "Album Discussion" will just drop down further.


thoughts?
 
Did you re-enable it?

I would need to inspect the code while it is active.
currently active.

added:
Code:
<xen:foreach loop="$renderedChildren" value="$child"><span class="xt-custom-children-child">{xen:raw $child}</span></xen:foreach>

so that it looks like the following in node_forum_level_2:
Code:
<h3 class="nodeTitle"><xen:if is="{$watchCheckBoxName}"><input type="checkbox" name="{$watchCheckBoxName}" value="{$forum.node_id}" />&nbsp;</xen:if><a href="{xen:link forums, $forum}" data-description="{xen:if @nodeListDescriptionTooltips, '#nodeDescription-{$forum.node_id}'}">{$forum.title}</a><xen:foreach loop="$renderedChildren" value="$child"><span class="xt-custom-children-child">{xen:raw $child}</span></xen:foreach></h3>
 
Glad you got it sorted.

I had a look late last night (around the time you posted) and decided that it would require some additional work to get the li element to sit in line.
 
Back
Top Bottom