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

How to do this?

Discussion in 'XenForo Development Discussions' started by Mr. Goodie2Shoes, Apr 14, 2012.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay... so I am trying to create something... I have created the route prefixes and stuff... at this moment, it looks like this:
    Code:
    http://domain.com/downloads/start/?[request code]
    and I want something like this:
    Code:
    http://domain.com/downloads/start/[request code]
    any help? :)
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's a little vague but...

    When using link syntax in the templates there are 3 basic forms:

    1) A route without any parameters, such as the index route:

    Code:
    {xen:link 'route'}
    
    2) A route with parameters which generates a query string (?...):

    Code:
    {xen:link 'route', '', 'param=value'}
    
    3) A route that takes a record for building the link:

    Code:
    {xen:link 'route', $var}
    
    This kind of link needs a route handler with an appropriate match() and buildLink() function to build and interpret the link. XenForo_Route_Prefix_Forums is an example you can look at. If you don't want a query string in your URL then this is probably the kind of link you want.
     
    aiman.h.kallaf likes this.
  3. vinavb

    vinavb Active Member

  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    bousaid and vinavb like this.
  5. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    These kinda stuff is pretty complicated I must say... :barefoot:
     

Share This Page