• 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?

Mr Lucky

Well-known member
#1
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.

Find:

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

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

ENF

Well-known member
#4
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.

Find:

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

Code:
<a href="{xen:link account/alerts}" rel="Menu" class="navLink NoPopupGadget">Some cusotm text here
Thanks.
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...
 

ENF

Well-known member
#6
I am editing the template modification for the style I am using.
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. :/
 

Steve F

Well-known member
#7
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.
 

Mr Lucky

Well-known member
#8
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:

Code:
{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.