• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 xen:if is="{$thread.thread_id} == 30 doesnt work

#1
This stopped working in XF 1.5.

Code in PAGE_CONTAINER:
Code:
  <xen:if is="{$thread.thread_id} == 30">
     <title>xxx</title> 
   <xen:else />
     <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
   </xen:if>
thread id 30 shows the standard title, not my custom one. Any idea why?
 

Mike

XenForo developer
Staff member
#3
That variable is not available in the PAGE_CONTAINER (and really never has been). You'll mostly need to change the title tag via the thread_view template (xen:title, xen:h1 tags).
 
#4
Thanks that worked. Here's the complete code in thread_view for those interested:
Code:
<xen:if is="{$thread.thread_id} == 30">
<xen:title>new title</xen:title>
<xen:else />
<xen:title>{xen:helper threadPrefix, $thread, escaped}{$thread.title}{xen:helper pagenumber, $page}</xen:title>
</xen:if>
(replace first line...)