title: In TWIG, is possible to get absolute url of a link with twig variables in it?
body: <p>I have several URLs that look as follows:</p>
  
  <p><code>{{domainID}}/action/{{userId}}/anotherAction</code></p>
  
  <p>And the latter URL points to:</p>
  
  <p><code>http://localhost/viewA/{{domainID}}/action/{{userId}}/anotherAction</code></p>
  
  <p>However, If I try to load <code>viewA</code> from <code>viewB</code> through an iframe, the link inside <code>viewA</code> instead of pointing to:</p>
  
  <p><code>http://localhost/viewA/{{domainID}}/action/{{userId}}/anotherAction</code></p>
  
  <p>it will point to:</p>
  
  <p><code>http://localhost/viewB/{{domainID}}/action/{{userId}}/anotherAction</code></p>
  
  <p>and the user will end up in a 404 page if it follows the latter. </p>
  
  <p>My question is:</p>
  
  <p>Is there anyway to get the absolute path of a url built that way in twig?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The route definition is:</p>
  
  <p><code>@Route("/domain/details/{domainId}", name="domain_detailed_view")</code></p>
  
  <p>I tried to get the absolute path this way:</p>
  
  <p><code>{{ url({{domainID}}/action/{{userId}}/anotherAction) }}</code></p>
  
  <p>but I get this error:</p>
  
  <blockquote>
    <p>A hash key must be a quoted string, a number, a name, or an expression
    enclosed in parentheses</p>
  </blockquote>