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

Rendering xen:link

HDJuegos

Active member
#1
I have a problem in templates with the input in xen:link

I made a template to call actionLike() from user, calling the $id like this:

Code:
<a href="{xen:link addon/like, $id}">Like $id</a>
When rendered, HTML shows Like 4 (the id) but href only shows:

Code:
<a href="addon/like">Like 4</a>
Im doing something wrong?. I also tried with friendly URLS off and dont work.

Thanks in advance
 
#2
I am quite a newbie, but as far as I understood, so that {xen:link would work with addon, you must have created a prefix called addon in your admin cp
and then code create class Addon_Route_Prefix_Addon implements XenForo_Route_Interface
there you can define where the link with prefix addon will take you AND what happens when you build link link with {xen:link addon....

Check examples in existing code in directory library / Xenforo / Prefix

if you want it to work without adding code, you must use an existing prefix.

Luc