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

Route Filters and xen:link

AndyB

Well-known member
#1
In my add-on called Calendar, I have a temple with this line of code using the xen:link

Code:
<form action="{xen:link 'threads/calendar/', $thread}" method="get" data-redirect="on">
As you can see the 'threads/calendar/' part requires the URL to have "threads" be part of the route. If a forum is using Route Filters, the "threads" part of the URL might be changed to something else.

Is there a way around this problem? It would seam that I would need to be able to determine if there is a Route Filter and if there is, what has "threads" been substituted with.

Thank you for any assistance.
 

Chris D

XenForo developer
Staff member
#2
There is no problem here.

Try it yourself. Change your "threads" route to "discussions". Any link built using {xen:link will pick up and apply that change.
 

AndyB

Well-known member
#3
Thank you for the correction, Chris.

As you stated, there is no problem at all and the code example in post #1 works perfectly.