Zig
Member
Hi everyone,
I'm currently working on an small addon that redirects a set of legacy links (from a different platform) to the Showcase addon, but XF2's link building callback functionality is undocumented. The goal is to take urls matching
Currently I've configured my route with the expected prefix, a route format of :str<product>, a link building callback method, and XenAddons\Showcase:Item as the controller. The link building callback method, however, isn't providing the expected results and drops the user at
Perhaps the object I'm returning is incorrect?
Thanks,
zig
I'm currently working on an small addon that redirects a set of legacy links (from a different platform) to the Showcase addon, but XF2's link building callback functionality is undocumented. The goal is to take urls matching
domain.com/redirect/product
, query our redirect table to fetch the showcase item_id for the product, and then redirect to domain.com/showcase/product.1234/
.Currently I've configured my route with the expected prefix, a route format of :str<product>, a link building callback method, and XenAddons\Showcase:Item as the controller. The link building callback method, however, isn't providing the expected results and drops the user at
domain.com/showcase/
.Perhaps the object I'm returning is incorrect?
return \XF::app()->router('public')->buildLink('showcase', $showcaseItemId);
Thanks,
zig