XF 2.0 XFRM Avatar Code for Header

Rayman

Member
Hi,

Unfortunately I don't own XFRM since I don't have a use-case for it, but I would like to know how I can achieve the same page header layout.
deovKzspRB_LTkCYbejyRg.png


I currently use <xf:h1> and then <xf:description meta="false">, but I'm unsure how & where to place <xf:avatar> so I can have it line up alongside them just as in the screenshot for XFRM.
 
The beginning template snippet for this area:

HTML:
    <xf:page option="headerHtml">
        <div class="contentRow contentRow--hideFigureNarrow">
            <span class="contentRow-figure">
                <xf:if is="$xf.options.xfrmAllowIcons">
                    {{ resource_icon($resource, 's') }}
                <xf:else />
                    <xf:avatar user="{$resource.User}" size="s" />
                </xf:if>
            </span>
            <div class="contentRow-main">
                <div class="p-title">
                    <h1 class="p-title-value">
                        <xf:if is="$titleHtml !== null">
                            {$titleHtml|raw}
                        <xf:else />
                            {{ prefix('resource', $resource) }}{$resource.title}
                        </xf:if>
                        <xf:if is="$resource.isVersioned()">
                            <span class="u-muted">{$resource.CurrentVersion.version_string}</span>
                        </xf:if>
                    </h1>
...
Hopefully that should allow you to get started.
 
Back
Top Bottom