1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Change thread titles in thread view into URL links

Discussion in 'Template Modifications [Archive]' started by Brogan, Nov 30, 2010.

  1. Brogan

    Brogan XenForo Moderator Staff Member

    Open the thread_view template.

    Find this on the second line:
    HTML:
    <xen:h1>{xen:helper threadPrefix, $thread}{$thread.title}</xen:h1>
    Replace with this:
    HTML:
    <xen:h1><a href="{xen:link threads, $thread}">{xen:helper threadPrefix, $thread}{$thread.title}</a></xen:h1>
    This does exactly the same as clicking the thread creation date so it is a bit superfluous in that respect but it might make it easier for some.

    So in the case of this thread it would make the following text into a URL link:
    Change thread titles in thread view into URL links

    thread_view.PNG
     
    arabic likes this.
  2. Floris

    Floris Guest

    Nice tweak :) Thank you Brogan for posting.
     
  3. ddmmh

    ddmmh Well-Known Member

    Hi Brogan,

    Just to clarify... this mod will basically take you to the first post everytime you click the thread title instead of taking you to the most recent post?
     
  4. Mikey

    Mikey Well-Known Member

    it'll change the big title text at the top of the thread into a link.

    Change thread titles in thread view into URL links

     
    Floris likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    As Mikey posted above, it just changes the thread title when in this view to a url link.
    I've added a screenshot to the first post to clear up any confusion.
     
  6. ddmmh

    ddmmh Well-Known Member

    Hi Brogan,

    Thanks. I realise now the "thread view" not "forum view" part lol. 3:30am... think its bed time.... cheers
     
  7. kkm323

    kkm323 Well-Known Member

    Is also SEO beneficial
    thanx
     
  8. DRE

    DRE Well-Known Member

    Er... Instead of

    HTML:
    <xen:h1>{$thread.title}</xen:h1>
    With 1.1 it now looks like this:

    HTML:
    <xen:h1>{xen:helper threadPrefix, $thread}{$thread.title}</xen:h1>
    so instead of this:

    HTML:
    <xen:h1><a href="{xen:link threads, $thread}">{$thread.title}</a></xen:h1>
    make it this?

    HTML:
    <xen:h1><a href="{xen:link threads, $thread}">{xen:helper threadPrefix, $thread}{$thread.title}</a></xen:h1> 
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    First post updated to reflect the new code in 1.1.
     
  10. Kier

    Kier XenForo Developer Staff Member

    FWIW, clicking the date in the thread description under the title will always take you to the first post too.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    This is mainly for my own use on my own site, so I can quickly and easily get back to the first post of a thread, no matter what page I am on.
     
    The8thLegion likes this.
  12. DRE

    DRE Well-Known Member

    Although it's a small-template edit, it's EXTREMELY convenient. It makes perfect sense. Thanks Brogan.
     

Share This Page