Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Get the url from grav page

Started by Luca Caputo 6 years ago · 4 replies · 1913 views
6 years ago

Schermata da 2020-07-27 14-18-21|690x388

I want to take the url of the page and insert it inside a specific twig element, like this:

TWIG
     <a href="{{ url }}"></a>
6 years ago

Hi @lucapu88, I think page.url might be what you are looking for?

Let me know.
Paul

6 years ago

Hello @paulhibbitts! thanks for replying, but unfortunately page.url gives me the url of the page where I write. I wish I could insert any url in the .md file, then a user writes https://www.url.it and then I can call it in a <a> tag wherever I want in the .twig file,

last edited 07/28/20 by Luca Caputo

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago