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

Rendering xen:link

Discussion in 'XenForo Development Discussions' started by HDJuegos, Oct 27, 2010.

  1. HDJuegos

    HDJuegos Active Member

    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:

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

    <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. Luciano

    Luciano Member

    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.

  3. HDJuegos

    HDJuegos Active Member

    Thanks a lot, i look into Route and solved it.

Share This Page