Solved How do I build a link?

LPH

Flight Director
Staff member
Linking is much easier in XenForo 2 than in XenForo 1.

Outside of XenForo 2:
PHP:
\XF::app()->router()->buildLink( 'canonical:members', $latestUser )

Inside an add-on in XenForo 2 might look like the following:
PHP:
$this->buildLink('add-ons')

The $this references the current object.
 
Top