Route Filters and xen:link

AndyB

Well-known member
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.
 
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.
 
Thank you for the correction, Chris.

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