Skip to content

Instantly share code, notes, and snippets.

@a-ast
Created July 14, 2015 10:55
Show Gist options
  • Select an option

  • Save a-ast/e7e059eccfae8f04edf0 to your computer and use it in GitHub Desktop.

Select an option

Save a-ast/e7e059eccfae8f04edf0 to your computer and use it in GitHub Desktop.
eZ Publish: How to generate url alias form location or location id
$router = $this->container->get('router');
$url = $router->generate(
$targetLocation,
array(
'siteaccess' => ...
), // it is possible to pass another siteaccess here
UrlGeneratorInterface::ABSOLUTE_URL
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment