{$entry.title|replace:'&':'&'}

Discussion in 'Technical Support' started by bowers01, Jul 2, 2009.

Thread Status:
Not open for further replies.
  1. bowers01 Genius At Work

    Hi,
    I am tring to use
    Code:
    {$entry.title|replace:'&':'&'}
    in my showlistings but it just shows & instead of &, this same code works fine in viewlistings.
    Any idea?
    Cheers
  2. Lhotch curmudgeon

    did you clear template cache? Did you edit the correct showlistings template?
  3. bowers01 Genius At Work

    Hi,
    Thanks for the reply, yeah i have cleared the templates_c folder. It is in the right file, it used to show as & but would not validate. So i put that in so it will but doesnt show properly, its like its not being parsed as html just as plain text.
    Any ideas?
  4. seymourjames All Hands On Deck

    No reason why I can put my finger on but just try it with " instead of '. It will probably not make a difference.
  5. bowers01 Genius At Work

    Thanks for the reply but it still does the same thing.
    Nick
  6. bowers01 Genius At Work

    any other ideas?
  7. seymourjames All Hands On Deck

    This works for me in showlistings. I just tried it. Note use of " and not ' or ' '.

    {$entry.title|replace:"&":"&"}


    It clearly puts & into the page source which it should but gets displayed on your page as just &. Voila!!!
  8. bowers01 Genius At Work

    I just found something strange.
    The title is already changed. I looked at the source code which is what i should have already done and it was coming out like this
    if i remove the replace it was coming out
    which is fine, then i remembered the only 2 ads on my site were placed during v4.07 or 8.
    All new ads are already changed to & was this a new feature in 4.09?
    Problem is solved anyway, for the two older ads i went into administration and opened them up and then just clicked submit and it changed them to &
    as far as i can remember i did not implament anything to do this so it must have been a new feature.
    Cheers,
    Nick
  9. seymourjames All Hands On Deck

    If you don't do the replace, I can tell you that in 4.14, the source will just put & and not &
Thread Status:
Not open for further replies.

Share This Page