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

Rewrite string with spaces to "url" string with -

Discussion in 'XenForo Development Discussions' started by attemis, Oct 28, 2014.

  1. attemis

    attemis Member

    Hey,
    i want to rewrite a string (from the database) to use it in a url like this:
    Code:
    route/string-from-database.2/
    At the moment the url looks like this:
    Code:
    route/string from database.2/
    I searched already in XenForo_ControllerPublic_Thread and in XenForo_Route_Prefix_Threads, but i cant finde the piece of code which does this :(

    Can someone give me a hint? :)

    Thank you
    attemis
     
  2. Jeremy

    Jeremy Well-Known Member

    Are you storing that string or just an ID you need to turn into the proper URL?
     
    attemis likes this.
  3. Jeremy

    Jeremy Well-Known Member

    Ah, sorry, I see it now. You should be using XenForo_Link for the route and it pulls out the necessary ID and string based on the route prefix definitions.
     
    attemis likes this.
  4. attemis

    attemis Member

    Okay Thank you! I 'll try that!
     
  5. attemis

    attemis Member

    Thank you!!! It works now :)
     

Share This Page