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

How to build addon link in PHP code

Discussion in 'XenForo Development Discussions' started by Nobitakung, Sep 27, 2016.

  1. Nobitakung

    Nobitakung Member


    I'd like to build links to pages which are generated from an addon (Showcase) in PHP code -- not in template. Anyone please advise how to do that? Create the route object and call its buildLink method?

    While searching I found XenForo_Link::buildBasicLink and XenForo_Link:buildPublicLink , can I use these methods?

  2. Nobitakung

    Nobitakung Member

    Okay, I've managed to find the way myself. In case anyone would like to know, I check the buildLink method of the route object and found that it return XenForo_Link::buildBasicLinkWithIntegerParam, then I just use echo (or print_r) to examine what parameter it takes. Now I know how to use the method. That's it.

Share This Page