1. 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

Discussion in 'Styling and Customization Questions' started by planetzu, Sep 21, 2013.

  1. planetzu

    planetzu Member

    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.

    <xen:title>{xen:phrase create_thread}</xen:title>
  2. EQnoble

    EQnoble Well-Known Member

    If you only wanted to effect two forums with that change...

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

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

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

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

    <xen:title>{xen:phrase create_thread}</xen:title>
    planetzu likes this.
  3. planetzu

    planetzu Member

    Thanks a lot for that!

Share This Page