• 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


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?

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.