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 · 1871 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 Hanns Mattes, 6 days ago
0 93 6 days ago
General · by Dima, 2 weeks ago
1 121 2 weeks ago
General · by pamtbaau, 2 weeks ago
0 192 2 weeks ago
General · by lynbor, 2 months ago
5 701 4 weeks ago
General · by Andy Miller, 1 month ago
0 425 1 month ago