# Full site url in Slim Framework 4

**URL:** <https://discourse.slimframework.com/t/full-site-url-in-slim-framework-4/4472>\
**Category:** Questions\
**Created:** [October 29, 2020, 7:17am UTC](https://discourse.slimframework.com/t/full-site-url-in-slim-framework-4/4472 "2020-10-29T07:17:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codus](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/codus/32/1255_2.png) [@Codus](https://discourse.slimframework.com/u/Codus)\
**Post date:** [October 29, 2020, 7:17am UTC](https://discourse.slimframework.com/t/full-site-url-in-slim-framework-4/4472/1 "2020-10-29T07:17:59Z")

</div>

Hello! I upgraded to Slim Framework 4 + slim / twig 3 + slim / psr7. My task required using the full path to the site (for example, [http://example.com/test](http://example.com/test)) in the twig template. Tell me how can I do this? I looked at the TwigExtension class, but there is only the full\_url\_for function, it is not suitable for my task. I need exactly the current full path. Or at least just the full path of the site, so that I can then add the relative to it via current\_url.

Thanks!

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [November 3, 2020, 11:29am UTC](https://discourse.slimframework.com/t/full-site-url-in-slim-framework-4/4472/2 "2020-11-03T11:29:58Z")

</div>

To get the current URL you can try `{{ get_uri() }}`

Get the current URL path: `{{ get_uri().getPath() }}`

[Slim Twig View Template Functions](https://github.com/slimphp/Twig-View#custom-template-functions)

---

<div class="post-metadata">

**Author:** ![Codus](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/codus/32/1255_2.png) [@Codus](https://discourse.slimframework.com/u/Codus)\
**Post date:** [November 3, 2020, 11:45am UTC](https://discourse.slimframework.com/t/full-site-url-in-slim-framework-4/4472/3 "2020-11-03T11:45:06Z")

</div>

Thanks, so much!

Regards, Mark.
