XF 1.4 output custom column in title_bar

fred66

Member
Hey anybody,

i want to put out a column field from xf_thread (mysql table). The name of the field is named "test".
How can i do this in the TitleBar of page_container template?
Can anybody help me please?


HTML:
                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">                       
                            <!-- h1 title, description -->
                            <div class="titleBar">
                                {xen:raw $beforeH1}
                                <h1><xen:if
                                    is="{$h1}">{xen:raw $h1}<xen:elseif
                                    is="{$title}" />{xen:raw $title}<xen:else
                                    />{$xenOptions.boardTitle}</xen:if></h1>
                                    
                                
                                    
                                
                                <xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
                            </div>
                        </xen:if>
                        </xen:hook>
 

fred66

Member
the column is named "test" and is a BLOB FIELD like this

a:1:{s:2:"test1";s:72:"ONLY THIS OUTPUT";}

how i can output only the text "ONLY THIS OUTPUT" ?



now i have in my thread_view:
HTML:
<xen:container var="$threadTest">{$thread.test}</xen:container>
and in my page_container:
HTML:
<div>{xen:raw $threadTest}</div>

i want only put out this "ONLY THIS OUTPUT"

thank u very much!!!
 

Jake Bunce

XenForo moderator
Staff member
I am not aware of any template functions to deserialize a string. You would have to extend the controller action to deserialize the value in PHP. This then becomes a proper addon, not just a template hack.
 
Top