- 🇬🇧United Kingdom joachim
I've got a quick hack working with an outbound path processor service:
class SiteRootOutboundPathProcessor implements OutboundPathProcessorInterface { /** * {@inheritdoc} */ public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) { if (!$request) { // WTF? Why is $request sometimes NULL? return $path; } if (!$request->attributes->has(StaticGeneratorInterface::REQUEST_KEY)) { return $path; } // Hardcoded for now - should get this value from the base URL option in the form. $options['base_url'] = 'http://localhost:8888/tome-blog/html/tome-blog/web'; return $path; } }