Navigation on External Site (how do I get canonical links rather than relative?)

LPH

Well-known member
The code below pulls the template. Unfortunately the getEffectiveContainerParams is also pulling full instead of canonical, which leads to relative links.

Is there a way in the array for getEffectiveContainerParams to get the canonical links? Instead of $params using the $dependencies, should I attempt to build another method that pulls canonical links?

PHP:
$dependencies = new XenForo_Dependencies_Public();
$dependencies->preLoadData();

$dependencies->preRenderView();
$params = $dependencies->getEffectiveContainerParams(array(),new Zend_Controller_Request_Http());
$template =$dependencies->createTemplateObject('navigation', $params);

echo $template->render();
 

Mike

XenForo developer
Staff member
Essentially no, the code is what's set to pull "full". You could try to manipulate the URLs before rendering or you could manually set the values in "requestPaths" inside XenForo_Application as that's used to determine the full URLs.
 

LPH

Well-known member
You could try to manipulate the URLs before rendering or you could manually set the values in "requestPaths" inside XenForo_Application as that's used to determine the full URLs.
Thank you for the suggestions. I'll keep puttering along.
 
Top