Closed mmmykhailo closed 6 years ago
{{ page.url }} didn't work for me
You can get the URL of the current page using {{ current_page.url }}
. Please note that this variable is undefined for "virtual page" that are generated by a plugin on-the-fly. However, this variable doesn't include HTTP GET (or URL GET) parameters.
If you rather want to access HTTP GET ($_GET
in PHP) or HTTP POST ($_POST
in PHP) variables, use Pico's official HTTP params plugin (http://picocms.org/plugins/#entry-http-parameters). Please note that this plugin will be part of Pico's core starting with Pico 2.0 (currently in beta).
Thank you again
Can I get URL of current page in twig? I need something like $_GET from php.