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

XF 1.5 Why doesn't this template modification work?

Discussion in 'Styling and Customization Questions' started by Mr Lucky, May 21, 2016.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    I want to replace the default phrase here (can't do it in phrases as I only want it in this one position)

    However it doesn't seem to work, ie the default phrase remains.


    <a href="{xen:link account/alerts}" rel="Menu" class="navLink NoPopupGadget">{xen:phrase alerts}

    <a href="{xen:link account/alerts}" rel="Menu" class="navLink NoPopupGadget">Some cusotm text here
  2. Deceptive

    Deceptive Active Member

    Can't you just create your own phrase and only place it their?
  3. DieselMinded

    DieselMinded Well-Known Member

    maybe need a <div> ?
  4. ENF

    ENF Well-Known Member

    You have to edit it for the style you're using. If you edit the default style but not a custom one you're using, it will only show on the default style.

    Your method will work as you wrote it, but I'm guessing you're not editing it on the right style...
  5. Mr Lucky

    Mr Lucky Well-Known Member

    I am editing the template modification for the style I am using.
  6. ENF

    ENF Well-Known Member

    Strange, maybe the style is using something different - so it may require editing somewhere else. Hard to say...

    At the very least, it works on my local test install... with default style anyway. :/
  7. Steve F

    Steve F Well-Known Member

    Does the template modification show that it is applying for the style you are using?

    Aside from all that, try to not use such a long "find" text or you may need to use regex replacement. It works for the default style but I would venture to say many custom styles it would not work.
  8. Mr Lucky

    Mr Lucky Well-Known Member

    Thanks all for your suggestions, I will do some more testing today to see if there is any conflict with styles or other addons.

    BTW, it is working fine to just find and replace the phrase I want changing in the TM:

    {xen:phrase alerts}
    The problem is it changes it in three laces in that template and I only want the change in one place (the navigation)

    It works fine if I edit the template directly, but the main reason I'm doing this is an exercise for myself in creating a simple addon.

Share This Page