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 · 1935 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 Sergi, 2 days ago
1 73 2 days ago
General · by themetman, 5 days ago
2 95 4 days ago
General · by Hanns Mattes, 2 weeks ago
0 148 2 weeks ago
General · by Karmalakas, 2 weeks ago
2 221 2 weeks ago
General · by Hanns Mattes, 4 weeks ago
0 282 4 weeks ago