XF 2.1 matchCallback issue


Active member
I'm trying to set up a bbcode embed but I can't get it to work.

I have my template being included:

<xf:include template="file_view" />

Then I have in the advanced options:

URL match callback: path\to\fileview and matchCallback as the method

I have this set in my class:

public static function matchCallback($url, $matchedId, \XF\Entity\BbCodeMediaSite $site, $siteId) {


My actionIndex method is what returns the file_id that I need (for my file_view template), so is that what is supposed to be $matchedId?
The $matchedId is derived from the match URLs setting. If you specify example.org/file/{$id} then the URL example.org/file/23 would resolve 23.
Top Bottom