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

XF 1.2 Replacing 'Create a Post' text with Forum Title

#1
Currently when a user clicks on 'Post New Thread' button, he is taken to the 'Create-Thread' page which has the standard heading 'Create a Post'. Is there a way to replace this 'Create a Post' text with the 'title' of the respective forum?

For example, let's say there are the following 2 forums:
1.) Introductions
2.) Hangout

If the user where to post inside 'Introductions' the 'Create a Post' text should read 'Introductions' and if the user were to post under 'Hangout' the text should read 'Hangout'. Hopefully I made sense.

Would this be possible? I know I need to edit the 'Thread_Create' template and replace the following code with something, just not sure with what.

Code:
<xen:title>{xen:phrase create_thread}</xen:title>
 

EQnoble

Well-known member
#2
If you only wanted to effect two forums with that change...

Find:
HTML:
<xen:title>{xen:phrase create_thread}</xen:title>
Replace with:

HTML:
<xen:title>
<xen:if is="{$forum.node_id} == 2">
{$forum.title}
<xen:elseif is="{$forum.node_id} == 3" />
{$forum.title}
<xen:else />
{xen:phrase create_thread}
</xen:if>
</xen:title>

change == 2" and == 3" to represent the forum id # which you would like to change
__________________________


If you want that to show for every node...

Find:
HTML:
<xen:title>{xen:phrase create_thread}</xen:title>
Replace:
HTML:
<xen:title>{$forum.title}</xen:title>