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

XF 1.4 Template modifications - how do I deal with tabs and carriage returns?

Discussion in 'XenForo Questions and Support' started by Stuart Wright, Jan 23, 2015.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    So I have this portion of HTML from a template:
    Code:
        <xen:if is="{$thread.user_post_count}"><xen:avatar user="$visitor" size="s" img="true" class="miniMe" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}" /></xen:if>
         </span>
    </div>
    And I want to insert something before the closing div.
    There are tabs and carriage returns. Copying and pasting the template into the 'find' text box doesn't work. I.e. the 'test modification' function fails to insert my new html correctly.
    How do I have it search for tabs and carriage returns properly please?
     
  2. Liam W

    Liam W Well-Known Member

    When I do it, I simply copy it directly from the template view when creating the mod, tabs and new lines in tact, then paste it into the find box.

    Never had any issue yet...

    Liam
     
  3. Xon

    Xon Well-Known Member

    @Stuart Wright you can use regexes. But honestly that just adds another problem as they can be horrible to deal with.
     
  4. Stuart Wright

    Stuart Wright Well-Known Member

    Ah the solution is way simpler than I had imagined. Copying and pasting from the source template does not retain the tabs.
    But typing them in manually works fine.
    I really didn't expect the find and replace system to work so 'literally'.
    Thanks :)
     

Share This Page